4 Replies Latest reply on Oct 9, 2013 2:27 PM by Jose Alvarez de Lara

    can't see jsp files in /WEB-INF/views folder

    Jose Alvarez de Lara Novice

      Hi,

       

      I am trying a spring MVC webapp proyect created as an example by JBDS. I am talking about

      jboss-springmvc-webapp example and I am having troubles when I try to see the webapp on the

      browser.

       

      The url should be http://localhost:8080/jboss-springmvc-webapp/ but I get error 404.

       

      Here is the web.xml file,

       

      <context-param>

      <param-name>contextConfigLocation</param-name>

      <param-value>classpath:/META-INF/spring/applicationContext.xml,

       

              classpath:/META-INF/spring/infrastructure.xml</param-value>

       

      </context-param>

       

      <listener>

      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

      </listener>

       

      <servlet>

      <servlet-name>jboss-as-kitchensink</servlet-name>

      <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

      <init-param>

      <param-name>contextConfigLocation</param-name>

      <param-value>/WEB-INF/jboss-as-spring-mvc-context.xml</param-value>

      </init-param>

      <load-on-startup>1</load-on-startup>

      </servlet>

       

      <servlet-mapping>

      <servlet-name>jboss-as-kitchensink</servlet-name>

      <url-pattern>/</url-pattern>

      </servlet-mapping>

       

      and the jboss-as-spring-mvc-context.xml file results as follows,

       

      <context:component-scan base-package="org.jboss.tools.example.springmvc.mvc"/>

       

      <mvc:annotation-driven />

       

      <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">

          <property name="prefix" value="/WEB-INF/views/"/>

          <property name="suffix" value=".jsp"/>

      </bean>

       

      <!-- no 'id' required, HandlerMapping beans are automatically detected by the DispatcherServlet

      <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">

      <property name="mappings">

          <value>

              /*/account.form=editAccountFormController

              /*/editaccount.form=editAccountFormController

              /ex/view*.html=helpController

              /**/help.html=helpController

          </value>

      </property>

      </bean>

      -->

       

      <mvc:resources mapping="/static/**" location="/"/>

       

      <mvc:default-servlet-handler />

       

      The problem is that I can not see the jsp files in /WEB-INF/views folder.

      How do I must to do to get it?

       

      Thanks,

      Jose