•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 402,055 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,390 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 471 | Replies: 4 | Solved
![]() |
•
•
Join Date: Jul 2008
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 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
Oh, i MUST use the get method, i was told to... so if anyone can guide me id very much appreciate it!
tia.
this is what ive got on the first page
html Syntax (Toggle Plain Text)
<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.
Last edited by peter_budo : Jul 25th, 2008 at 8:02 am. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Jul 2007
Location: Mumbai(Bombay), India
Posts: 164
Reputation:
Rep Power: 2
Solved Threads: 25
That would be as simple as calling
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.
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.
Last edited by stephen84s : Jul 25th, 2008 at 8:44 am.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
•
•
Join Date: Jul 2008
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 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?
this is what i have on pagina2.jsp, could you tell me what im missing?
<html>
<body>
<request.getParameter('usuario');>
</body>
</html> Last edited by Tekmaven : Jul 25th, 2008 at 1:08 pm. Reason: Code tags
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,222
Reputation:
Rep Power: 10
Solved Threads: 270
It will never work as you directly inserted Java element into pure HTML without telling HTML you about to use something related to Java. You better start learning for example here, The Java EE 5 Tutorial
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the JSP Forum
- Previous Thread: JSP ERROR
- Next Thread: Go to upper folder



Linear Mode