This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes url related Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "url related" Watch "url related" New topic

url related

Anu Biswas

Joined: Mar 22, 2007
Posts: 1

I need to hide the name of the jsp file being accessed, from the URL being displayed in the browser.
I.e. if the initial page is being displayed as, and then I click some link or button and a new page say abc.jsp is being fetched, then I donot want to be displayed. Instead I need to continue showing, and this needs to be maintained everywhere.

Any help will be appreciated...Thanks in advance!
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
You can route the display of the jsp through the controller then, by having the controller handle the request and forward to the jsp. The URL will stay the same. Or you can also map that jsp to whatever URL you want via the deployment descriptor.

So much trouble in the world -- Bob Marley
biny panackal
Ranch Hand

Joined: Apr 12, 2007
Posts: 72
if you need only to display the firt URL in the site. then you have to use <jsp:forward to go from one page to other. If you are using this the url keeps same and page changes

Biny Balan
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60774

Originally posted by biny panackal:
if you need only to display the firt URL in the site. then you have to use <jsp:forward to go from one page to other.

Forwarding only works within a single request. It cannot be used in place of links to traverse from page to page.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
It is sorta covered in the JavaRanch Style Guide.
subject: url related
Similar Threads
alternative to query string
calling JSP page in a Windows
Dynamic path configuration/resolving
request.getRequestURI() problem