Announcement Announcement Module
Collapse
No announcement yet.
Question on deploying web app to domain Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question on deploying web app to domain

    Hi,

    How can I easily map my webroot/webapp to simply / instead of subdir? I want this for host localhost.

    I want this to work both with sts toolsuite and when running the server normally.

  • #2
    Use /, rather than /*, in your web.xml url-pattern:

    Code:
    <servlet>
            <servlet-name>springmvc</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    </servlet>
    
     <servlet-mapping>
            <servlet-name>springmvc</servlet-name>
            <url-pattern>/</url-pattern>
    </servlet-mapping>

    Comment

    Working...
    X