Announcement Announcement Module
Collapse
No announcement yet.
Default Page - Tomcat - No Redirect Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Default Page - Tomcat - No Redirect

    My home page is handled by a spring controller and can be accessed at:
    http://www.mydomain.com/myappname/app/home

    I want the page to load by visiting
    http://www.mydomain.com

    I know I can don this by putting an index page which redirects to the longer link, but how can I do this without a redirect? I don't want the address in the address bar to change?

    Thanks
    Last edited by mitalub; Apr 16th, 2009, 07:04 AM.

  • #2
    Answer from another forum:

    In practice, I've found the easiest way is to do this:
    - Create index.jsp
    - Add a one line /index.jsp which does a forward to your home page like
    this:

    <jsp:forward page='/myappname/app/home'/>
    All the examples I had seen used c:redirect, which causes the address bar in the browser to change. Using forward does the trick and looks cleaner to the client.

    Comment

    Working...
    X