Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2893

web mvc setup creates two mvc servlets in trunk

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.2.0.RC1
    • Fix Version/s: 1.2.0.RC1
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      This is with build c2393bf. When Roo generates / updates the web.xml file - it puts two copies of the mvc context in the system, and maps both to '/':

      in web.xml:

          <!-- Handles Spring requests -->
          <servlet>
              <servlet-name>app</servlet-name>
              <servlet-class&gt;org.springframework.web.servlet.DispatcherServlet</servlet-class&gt;
              <init-param>
                  <param-name>contextConfigLocation</param-name>
                  <param-value>/WEB-INF/spring/webmvc-config.xml</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
          </servlet>
          
          
          
          <servlet>
              <servlet-name>pizzashop</servlet-name>
              <servlet-class&gt;org.springframework.web.servlet.DispatcherServlet</servlet-class&gt;
              <init-param>
                  <param-name>contextConfigLocation</param-name>
                  <param-value>WEB-INF/spring/webmvc-config.xml</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
          </servlet>
          
          <servlet-mapping>
              <servlet-name>pizzashop</servlet-name>
              <url-pattern>/</url-pattern>
          </servlet-mapping>
          <servlet-mapping>
              <servlet-name>app</servlet-name>
              <url-pattern>/</url-pattern>
          </servlet-mapping>
      

      I found this running the pizzashop example and noticed it when doing a jetty:run and getting the two web contexts.

        Attachments

          Activity

            People

            Assignee:
            stewarta Alan Stewart
            Reporter:
            krimple Ken Rimple
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: