/* Copyright (c) SEMM NL All rights reserved.
Author : Paul Hamaker. Part of JavaLessons.com
This code is for educational purposes only. Use at own risk.*/

1. =====  formpost.jsp  in  jsptest.war  ======= 

2. <HTML

3. <HEAD><TITLE

4. JSP Form 

5. </TITLE></HEAD

6. <BODY

7.  

8. <h2

9. <ul

10. <li

11.   <%= request.getParameter("firstname") %> 

12.  

13.     ${ param.firstname } 

14. <li

15.   <%= request.getParameter("radiogroup") %> 

16. <li

17.   <%= request.getParameterValues("optionlist")[0] %> 

18.  

19.     ${ paramValues.optionlist[0] } 

20. </ul

21. </h2

22.  

23. </BODY></HTML

24. ======  formpost.html in jsptest.war  ========== 

25. <HTML

26. <HEAD><TITLE

27. Posting Form 

28. </TITLE></HEAD

29. <BODY

30.  

31. <FORM ACTION="formpost.jsp" METHOD="POST"

32.  

33. First name : 

34.  

35. <INPUT TYPE="TEXT" NAME="firstname" MAXLENGTH="35"

36. <BR

37. Spiritual 

38. <INPUT TYPE="RADIO" NAME="radiogroup" VALUE="spirit" CHECKED

39. Physical 

40. <INPUT TYPE="RADIO" NAME="radiogroup" VALUE="physic"

41.  

42. <BR

43. <SELECT NAME="optionlist" SIZE="4" MULTIPLE

44. <OPTION VALUE="Seth" SELECTED>Seth 

45. <OPTION VALUE="Jane" >Jane 

46. <OPTION VALUE="Robert" >Robert 

47. <OPTION VALUE="Ruburt" >Ruburt 

48. </SELECT

49. <INPUT TYPE="SUBMIT" VALUE="Send"

50.  

51.  

52. </FORM

53.  

54. </BODY

55. </HTML

56.