How to get HTML form values in the same JSP

Hi all!

For example, I have a "newuser.jsp" and I use an "addUser(...)" method there which needs some textfield values from the form being generated by itself (newuser.jsp). To migrate to the JSP Page I came from ("next.jsp"), I use an additional JSP Page which receives hidden values from "newuser.jsp" by request.getParameter(...) method and automatically does "action="next.jsp"".

Are there any other methods to get current form values.

Thank You.

[482 byte] By [killC] at [2007-9-26 2:29:52]
# 1

another alternative is...

in your JSP create a FORM tag (which you must already be doing) without

an action. Then when the form submits, it posts to itself and you

could do request.getParameter( )

i haven't tried it, but fairly confident that this is how it works.

- madhav

mlakkapr at 2007-6-29 9:47:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

This doesn't work with netscape very well if your worried about supporting it. just put newuser.jsp into the action field.

> another alternative is...

>

> in your JSP create a FORM tag (which you must already

> be doing) without

> an action. Then when the form submits, it posts

> to itself and you

> could do request.getParameter( )

>

> i haven't tried it, but fairly confident that this is

> how it works.

>

> - madhav

bobd3 at 2007-6-29 9:47:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...