Links
Hello
I would like to provide some links in my menu.jsp like the following:
<a href="/controller">Products</a>
<a href="/controller">Customers</a>
The problem is the fact that I need to pass some objects into session object to controller. The way above do not allow it , right ? If not, how can I provide options that when accessed but user they send the session object.
For example:
request.getRequestDispatcher("menu.jsp").forward(request, response);
This way the session object and its attributes was passed to menu.jsp .
Sorry if I was not clearly. It is not easy to explain...
Thank you so much !
I'm so sorry. I know it was not clearly. It is not easy to explain, but I will try again.
Well, A JSP has some objects implicit, such as REQUEST, SESSION, etc..., right ? I would like to pass them to controller when the user select the link.
The goal is get an Attribute that I had bound to SESSION.
I hope I get across.
Thanks for help me !
The implicit objects in a JSP are only available on teh server. Once the client gets the page it has been converted to straight HTML. The user can not access the objects.
However the session object can be accessed on the server for every user request so you should be able to access any objects that you have stored as session attributes (on the server side).