What is the relationship of the servlet to the JSP?
Assuming that the servlet is submitted to by the HTML page generated from the JSP, then the only way to send data to the servlet over HTTP is as request parameters; either in the query string or as form elements.
Or, take the direct (server-only) approach and place the values in the session for later retrieval.
my assumption is if i set some properties in a bean (from jsp) those values i can retrieve in the servlet from that bean. but how? i dont know how to write the code.
or is my assumption is wrong?
I'm not clear on why you'd want to instantiate a bean in a JSP, set its values, then retrieve it in the servlet.
Why not just create the bean in the servlet that displays the original JSP? Or if you *are* submitting a form, put the values into the form.
Vaib Gupta
Greenhorn
Joined: May 11, 2009
Posts: 15
posted
0
Please correct me if I have not understood your problem. You want to access 'bean' in your servlet. Isn't 'bean' set as a session attribute when you specify