Can I pass GET parameters specified within the ACTION clause of a FORM in a JSP page as:

Frank Steidinger

You can do this if the FORM itself is submitted using POST. So the example would be:

<FORM ACTION="xyz.jsp?userid=<%=userid%>" METHOD="POST">

This way you can read the userid from xyz.jsp along with the fields from the form you are submitting. An alternative would be to use a hidden field as in:

<input type="hidden" name="userid" value="<%=userid%>">

If you include a hidden field like this in your form you can use GET or POST to submit it and the userid is passed to the xyz.jsp just like any other field.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact