Mega Code Archive
Categories
/
Java Tutorial
/
JSP
Deal with Form TextField and Select Option
index.jsp
Simple Form Example
Name:
Occupation:
Hobbies:
Sports
Cooking
Camping
Reading
Music
simpleForm.jsp
Simple Form Example
Hello <%= request.getParameter("name") %>.
It must be very interesting being employed as a <%= request.getParameter("job") %>.
I see you enjoy the following hobbies:
<% String hobbies[] = request.getParameterValues("hobbies"); for (int n = 0; n < hobbies.length; n++) { %> <%= hobbies[n] %>
<% } %>