Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

See this: Pretty URL Mapping with Spring 3.0Pretty URL Mapping with Spring 3.0

Basically, change your servlet-mapping from /* to / and then you can worry about performing the redirect.

For the redirect, you should be able to do something like this (assuming use of the mvc namespace in XML config):

<mvc:view-controller path="/myapp" view-name="redirect:/myapp/welcome.html"/> 

See this: Pretty URL Mapping with Spring 3.0

Basically, change your servlet-mapping from /* to / and then you can worry about performing the redirect.

For the redirect, you should be able to do something like this (assuming use of the mvc namespace in XML config):

<mvc:view-controller path="/myapp" view-name="redirect:/myapp/welcome.html"/> 

See this: Pretty URL Mapping with Spring 3.0

Basically, change your servlet-mapping from /* to / and then you can worry about performing the redirect.

For the redirect, you should be able to do something like this (assuming use of the mvc namespace in XML config):

<mvc:view-controller path="/myapp" view-name="redirect:/myapp/welcome.html"/> 
Source Link
superEb
  • 5.7k
  • 38
  • 39

See this: Pretty URL Mapping with Spring 3.0

Basically, change your servlet-mapping from /* to / and then you can worry about performing the redirect.

For the redirect, you should be able to do something like this (assuming use of the mvc namespace in XML config):

<mvc:view-controller path="/myapp" view-name="redirect:/myapp/welcome.html"/>