The Servlet spec does not support 2 web.xml files. You should only have one -- located under the /WEB-INF folder. You can have multiple struts configuration files by specifying them in the Action Servlet configuration in web.xml:

<servlet>
<servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>
/WEB-INF/admin/struts-config.xml,
/WEB-INF/public/struts-config.xml
</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>5</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>5</param-value>
</init-param>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<!-- this number indicates relative order to load servlets -->
<load-on-startup>2</load-on-startup>
</servlet>



[EMAIL PROTECTED] wrote:


Hi,

I have upgrade of my project from struts 1.0.2 to Struts 1.1.
My project is an Intranet Portal and is composed of 2 parts : Admin and Public.
So, I have 2 differents files web.xml and struts-config.xml in 2 different folder 
(Admin and Public).
When the Admin part runs in the first one, it does not raise problem,
however when the Public part is run in second, I have the following error:

java.lang.LinkageError: loader constraints violated when linking 
org/apache/struts/action/ActionForm class
      at java.lang.Class.newInstance0(Native Method)
      at java.lang.Class.newInstance(Unknown Source)
      at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
      at 
org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:326)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:268)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:506)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at com.sssw.srv.resources.AgWarResource.doServletDispatch(AgWarResource.java:944)
      at com.sssw.srv.resources.AgWarResource.service(AgWarResource.java:723)
      at com.sssw.srv.resources.AgWarURLResource.perform(AgWarURLResource.java:114)
      at com.sssw.srv.http.httpd.perform(httpd.java:4592)
      at com.sssw.srv.http.Client.processRequest(Client.java:906)
      at com.sssw.srv.http.Client.loop(Client.java:1266)
      at com.sssw.srv.http.Client.runConnection(Client.java:1470)
      at com.sssw.srv.http.Client.run(Client.java:1430)
      at java.lang.Thread.run(Unknown Source)

When the Public part runs in the first one, it does not raise problem,
however when the Admin part is run in second, I have the same error.

It seems that my problem regards the configuration.
The code was not changed.

Thanks,

Antoine



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to