You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Russell Castagnaro <rc...@get2hawaii.com> on 2002/10/30 00:54:02 UTC

Registering and using multiple instances of ActionServlet with different config.xml files.

Hi all,

I am trying to deploy a struts application tha was previously deployed as 10
different web applications.  Each of them had thier own context, config,
etc, but they shared the same code and many of the same jsp's.

I'd like to deploy all the old apps in one web application <see web.xml
snippet below>.  It doesn't seem to work though.  The servlets do get
instantiated, but I don't think they ever get called.  Anyone have any
ideas?

Thanks!
Russell

<servlet>
<servlet-name>app1-action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
  <param-name>application</param-name>
  <param-value>/WEB-INF/Resources</param-value>
</init-param>
<init-param>
  <param-name>config</param-name>
  <param-value>/WEB-INF/app1-struts-config.xml</param-value>
</init-param>
<init-param>
  <param-name>validate</param-name>
  <param-value>true</param-value>
</init-param>
</servlet>

<servlet>
<servlet-name>app2-action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
  <param-name>application</param-name>
  <param-value>/WEB-INF/Resources</param-value>
</init-param>
<init-param>
  <param-name>config</param-name>
  <param-value>/WEB-INF/app2-struts-config.xml</param-value>
</init-param>
<init-param>
  <param-name>validate</param-name>
  <param-value>true</param-value>
</init-param>
</servlet>

 <servlet-mapping>
	<servlet-name>app1-action</servlet-name>
	<url-pattern>/app1/*.do</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
	<servlet-name>app2-action</servlet-name>
	<url-pattern>/app2/*.do</url-pattern>
  </servlet-mapping>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>