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 !

[690 byte] By [maazevedoa] at [2007-10-2 3:21:01]
# 1
Sorry but i don't understand.Would you like to pass objects to the controller like an array of strings when the user select a link?
leoncinaa at 2007-7-15 21:48:28 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

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 !

maazevedoa at 2007-7-15 21:48:28 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

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).

tolmanka at 2007-7-15 21:48:28 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...