I made a form in which it was written:
<form action= "orderitem.action?orderidz=1" method= "Get" >
<table cellpadding= "0" cellspacing= "0" border= "1px" >
<tr>
<th width= ">orderid</th><th" width= ">amount</th><th width=" > Operation </th ><th width= "><a" href= "addorder.action" > Add </a></th>
</tr>
<s:iterator value= "DataList" >
<tr onclick= "OrderItem (' <s:property value= ' orderId '/> ')" >
<td><s:property value= "orderId"/></td><td><s:property value= "Amount"/></td>
</tr>
</s:iterator>
</table>
<button type= "Submit" >go</button>
</form>
Then I was in the background to fetch Orderidz always can't get, and then check the internet I added in the form of the method= "post" in the background to obtain the use of:
HttpServletRequest request= servletactioncontext.getrequest ();
String roleid=request.getparameter ("Orderidz");
You can take it.
Check the reason:
the difference between get and post methods in form submission is 5 points
1.get gets the data from the server, and the post is to transfer the data to the server.
2.get is to add the parameter data queue to the URL that refers to the action attribute of the submission form, and the value corresponds to each field one by one in the form, as you can see in the URL. Post is the httppost mechanism by which each field in the form is placed with its contents in the HTML header and routed to the URL address referred to by the action attribute. This process is not visible to the user.
3. For Get way, server end uses Request.QueryString to obtain variable value, for post way, server end uses Request.Form to obtain the submitted data.
4.get transmits a small amount of data, not greater than 2KB. Post transfers have a large amount of data, which is generally default to unrestricted. In theory, however, the maximum number of IIS4 is 100KB in 80KB,IIS5.
5.get security is very low and post security is high.