Hi,
I wish to save value entered by user in textbox in a session variable.my form contains many elements and i need to navigate back and forth.so i want to save the value once entered by the user in a session variable so that i can retrieve it and display on navigating back.i know session.setAttribute("varname",stringvalue);
saves stringvalue in varname but how do i get textbox value as a string on the page and save it there?request.getParameter does not work on the same page.
Thanks
Ankita B 2 Light Poster
Recommended Answers
Jump to Postrequest.getParameter works just fine. You shouldn't use it of course as you should NEVER use any Java code on a JSP, but it does work.
Jump to PostJSPs are for presentation purposes only, not processing data.
They're also designed to be able to be maintained by non-programmers, people who don't know Java.
So they get presented with a set of tags (JSTL for example) that looks familiar to them.
Jump to Posthave you even bothered to read the entire thread?
Probably not, as you'd have learned not to do what you suggested.
All 10 Replies
majestic0110 187 Nearly a Posting Virtuoso
jwenting 1,905 duckman Team Colleague
majestic0110 187 Nearly a Posting Virtuoso
jwenting 1,905 duckman Team Colleague
majestic0110 187 Nearly a Posting Virtuoso
Ankita B 2 Light Poster
jwenting 1,905 duckman Team Colleague
Ankita B 2 Light Poster
sumit_indian -4 Newbie Poster
peter_budo commented: JSP is for presentation, servlet is for logic. Servlet is where you should setup connection with DB! -1
jwenting 1,905 duckman Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.