Go4Expert

Go4Expert (http://www.go4expert.com/)
-   JSP (http://www.go4expert.com/forums/jsp/)
-   -   sending textbox info from one page to another (http://www.go4expert.com/forums/sending-textbox-info-page-t12420/)

tefbaez 25Jul2008 05:41

sending textbox info from one page to another
 
Hey there, I need help with something... I need to create 2 .jsp pages, one with a textbox in which you submit a name, and the second one should display it when you i click the submit button...but i cant seem to get it right =S

this is what ive got on the first page

<html>
<body>
<form name="pagina" method="get" action="pagina2.jsp">
Nombre:
<input type="text" name="usuario">
<input type="submit" value="submit">
</form>
</body>
</html>

Oh, i MUST use the get method, i was told to... so if anyone can guide me id very much appreciate it!
tia.

bitwords 19Feb2009 19:18

Re: sending textbox info from one page to another
 
Irrespective of whether you use get or post, you can get the values on next .jsp page using request.getparameter() and store it into the string:

String txt = request.getParameter("usuario");

Then you can simply print the string :).


All times are GMT +5.5. The time now is 19:36.