Summary of four methods for passing parameters to the backend by JSP, four types of jsp backend Parameters
Jsp page value passing Method
I,The client submits the data to the server through the Form. The server submits the data to the server through the Form.
Java code
Request. getParameter (String xx );
To obtain the parameter (xx) as the parameter name.
Submit in get/post Mode
II,Hide a field to pass a value
You can add a hidden field to the form to submit it to the server. The advantage of this method is that you can add some parameters you want to add on the client to get the corresponding values.
Client code:
Java code
<Input type = "hidden" name = "id" value = ""/>
Server value:
Java code
String id = request. getParameter ("id ");
III,The value passing method through URL is to pass the value in Java code. Xx. jsp indicates to submit to the processing page, followed? The parameter and its value are to be passed, and the parameter and parameter are separated.
IV,Passing values through JavaBean means that the values of all forms are passed into a JavaBean through the introspection mechanism in Java.
The above four methods of passing parameters to the backend in JSP are all the content shared by the editor. I hope to give you a reference and support for the customer's house.