JBoss Community

Re: JBoss AS6.0.0.Final Spring MVC doesnt work

created by Mrinal Malhotra in Snowdrop - View the full discussion

Hi Marius

 

Thanks for the information, I was able to download Spring Release 3.0.5 and the application worked, with some minor modifications:

 

a) Moved the spring-contexts folder into WEB-INF (As I am not using the Snowdrop JAR file, I dont think I have the "classpath*" available anymore?)

b) I had to remove references to the contextClass in the web.xml, so the source for the web.xml  changed to (Maybe the source for the demo code should be appended for this change?) :

 

<web-app>

  <display-name>Classpath Scanning Spring MVC Web Application</display-name>

 

  <context-param>

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

    <param-value>/WEB-INF/spring-contexts/*.xml</param-value>

  </context-param>

   <listener>

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

  </listener>

 

  <servlet>

    <servlet-name>spring-mvc-servlet</servlet-name>

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

    <init-param>

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

      <param-value>/WEB-INF/mvc-config.xml</param-value>

    </init-param>

  </servlet>

 

  <servlet-mapping>

    <servlet-name>spring-mvc-servlet</servlet-name>

    <url-pattern>/spring/*</url-pattern>

  </servlet-mapping>

</web-app>

 

-Mrinal

Reply to this message by going to Community

Start a new discussion in Snowdrop at Community