0

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.

3
Contributors
4
Replies
6
Views
8 Years
Discussion Span
Last Post by tefbaez
0

That would be as simple as calling request.getParameter("--name-of-text-box--"); , in pagina2.jsp .

Also no need to stick to GET you can use POST without any issues. Only difference is GET would send your parameters as part of the HTTP URL (eg http://localhost/pagina2.jsp?usuario=tefbaez)
whereas POST would send it as part of the HTTP header, so it would not be visible in your address bar.

0

well if im not doing this wrong it should work, but im obviously not doint it right cuz its not working...

this is what i have on pagina2.jsp, could you tell me what im missing?

<html>
<body>

<request.getParameter('usuario');>


</body>
</html>
0

Thanks a lot for all your help, ill go ahead and read this tutorial now!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.