This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Servlets and the fly likes Problems for redirect pages using servlet with parameters. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problems for redirect pages using servlet with parameters." Watch "Problems for redirect pages using servlet with parameters." New topic
Author

Problems for redirect pages using servlet with parameters.

Gustavo Siqueira
Ranch Hand

Joined: Jun 15, 2011
Posts: 97

Hello,

I'm using a servlet as controller for redirect pages. The user login with a form that will be redirect for a jsp. Within in this jsp, there are several menu that is controlled with servlet parameters.
For example:

The user login in page, so, the url in browser is so: http://localhost:8080/Manggiare/manager/authEnter (Here page Home).

There are several menus: Home - Services - Contact.

When the user to click in Services, the servet will redirect for a jsp. So, the url is so: http://localhost:8080/Test/manager/authEnter/actionController?key=services

If the user wish return the page Home. The url is so: http://localhost:8080/Test/manager/authEnter/authEnter/actionController?key=home


How to fix that ?

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61450
    
  67

A) Why do you do you care what the URL is?

B) Why are you redirecting rather than forwarding?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
jQuery in Action, 2nd edition
 
subject: Problems for redirect pages using servlet with parameters.