[opencms-dev] Spring MVC integration. 2 jsp locations

jacek grzebyta (RRes-Roth) jacek.grzebyta at bbsrc.ac.uk
Thu Apr 29 12:58:32 CEST 2010


Hi,

That looks thing what I need.

In my config file I have:
<listener>
  <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>


<context-param>
	<param-name>contextConfigLocation</param-name>
  	<param-value>classpath:org/phibase/template/org.phibase.template.beans</param-value>
</context-param>
  
  <servlet>
  	<servlet-name>simple</servlet-name>
  	<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  	<init-param>
  		<param-name>contextConfigLocation</param-name>
  		<param-value></param-value>
  	</init-param>
  </servlet>
	
	<servlet-mapping>
		<servlet-name>simple</servlet-name>
		<url-pattern>*.spr</url-pattern>
	</servlet-mapping>

So do you mean change in the last tabs *.spr to /mvc? I guess after that all springs stuff will be outside opencms. And how to call it? Like /mvc/hello.spr ? Both from opencms and ajax? But then how to map views inside beans config. Now I have:

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

	<property name="prefix" value="views/"/>

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

	<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>

</bean

I guess if I export views to /opencms/WEB-INF/external/ directory I have to set up prefix according that.

Thanks a lot.
I'll test it.

Jacek


-----Original Message-----
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Marco Firrincieli
Sent: 29 April 2010 08:24
To: opencms-dev at opencms.org
Subject: Re: [opencms-dev] Spring MVC integration. 2 jsp locations

We did that by defining 2 different servlet-mappings:

	<servlet-mapping>
		<servlet-name>myspringservlet</servlet-name>
		<url-pattern>/mvc/*</url-pattern>
	</servlet-mapping>
	
	<context-param>
        	<param-name>OpenCmsServlet</param-name>
        	<param-value>/opencms/*</param-value>
    	</context-param>

_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list