Originally posted by Donna Bachner:
I have a similar problem. I have a JSP and want to call the Servlet also. I have a link I want to take to the servlet. I can go to another JSP fine but I can't get the resulets I want. From the jsp I was using a a href to the other jsp but it does not work for the servlet. Any ideas?
Once the response for the first JSP is sent to the browser, that request goes out of scope so any scoped variabled placed on it will not be available for a new request generated by clicking on a link in the page.
For a scoped variable to be available to multiple requests, you must use session scope (for user-specific data) or application scope (for application-shared data).
You could also use hidden variables on the page to store information that will be submitted back to the next request.