<form name= "thisform" method= "POST" action= "index.jsp" >
form is the form, and the double quotes are filled with the path you want to submit to this form. (another page, for example).
Method= "POST" refers to the way of submission, which means that the submission is not displayed in the Address bar when submitting information (such as account password). For the user's information security.
Name= "" Here double quotes inside refers to a name you want to give you the form.
What are the methods in the JSP page that can pass parameters? How does the page's parameters pass to the action?
Parameter passing in a JSP
1: Use the form to pass the value:
<form action= "target.jsp" > <input type=text name= "Usename" value= "Tom" ></form>
2:l using hidden fields to pass values
<form action= "target.jsp" > <input type=hidden name= "test" value= "test" ></form>
3: Use cookie object to pass
Cookie Cookie=new Cookie ("My", "Liuliu")
Cookie.setmaxage (60*60);(the maximum lifecycle in seconds)
Response.addcookie (cookie);
Cookie[] Cookies=request.getcookies ();(can access the value by traversing this array)
4:session
Java.util.map<string, object> session = Actioncontext.getcontext (). GetSession ();
Session.put ("S_username", username);
String username = (string) session.get ("S_username");
Session.setattribute ("ParamName", paramname);
String Name=session.getattribute ("ParamName")
5: Through the link to pass
String name=request.getparameter ("name");
<a href= "Welcome.jsp?name=<%=name%>" >