java - Getting Null from post data from jsp -


    <center>         <form class="form-horizontal" action="${pagecontext.servletcontext.contextpath}/largelandmarklistget" method="post">             <div class="form-group">                 <label class="control-label col-sm-2" for="sllrid">sllrid:</label>                 <div class="col-sm-10">                     <input type="text" class="form-control" id="sllrid" placeholder="enter sllrid...">                 </div>             </div>             <div class="form-group">                 <div class="col-sm-offset-2 col-sm-10">                     <button type="submit" class="btn btn-default">submit</button>                 </div>             </div>         </form>     </center> 

that particular definition of action in jsp.

string sllrid = request.getparameter("sllrid"); 

this how trying in servlet, within dopost method. however, sllrid null. i've tried can think of cannot return inputted value. however, if hardcode value, works perfectly, think there wrong when communicating between jsp , servlet.

what have tried:

  • changing name in for in label definition, id , for named differently

  • adding id value button

  • hardcoding value verify servlet

  • trying get rather post (though seemed wildly inappropriate)

  • testing other servlets same jsp (this worked, though not particular submission id)

  • ensuring needed entries in web.xml had said entries made

the form sends data based on name attribute. instead put: <input type="text" class="form-control" id="sllrid" name="sllrid" placeholder="enter sllrid...">


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -