Results 1 to 2 of 2

Thread: Question on deploying web app to domain

Hybrid View

  1. #1
    Join Date
    Jul 2010
    Posts
    22

    Default 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. #2

    Default

    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>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •