sending textbox info from one page to another

tefbaez's Avatar, Join Date: Jul 2008
Newbie Member
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.
0
bitwords's Avatar, Join Date: Feb 2009
Newbie Member
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 .