You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lawrence Williams <la...@idil.co.uk> on 2003/12/05 11:38:00 UTC
Problems with modules
Hi,
In my web.xml I have defined a default and named module as follows:
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/admin</param-name>
<param-value>/WEB-INF/struts-config-admin.xml</param-value>
</init-param>
And
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
Where index.jsp is simply:
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<logic:forward name="logon"/>
However, it seems that when I request the absolute URL:
http://localhost/myApp/admin/ (i.e. index.jsp)
Struts seems to look in my default struts-config.xml rather than in the module specific struts-config-admin.xml
i.e. I get
javax.servlet.jsp.JspException: Cannot find global ActionForward for name logon
The global-forward
<global-forwards>
<forward
name="logon"
path="/Logon.do"/>
Is defined in struts-config-admin.xml
I can tell struts is looking in the wrong place because if a make a forward in thew default config struts resolves the forward....
Any suggestions?
TIA
Lawrence
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 02/12/2003
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Problems with modules
Posted by Henrique VIECILI <vi...@softplan.com.br>.
Hi,
I have the same situation, and it only changes the default configuration to
module specific one if the request is to an action wich is declared inside the
struts-module-config.xml.
So, i think you must have an index.jsp page in the default module that calls
some action in the admin module (/admin/*.do).
/index.jsp shall be:
<jsp:forward page="/admin/logon.do" />
and 'logon' shall be declared in struts-admin-config.xml as follows:
<action path="/logon" type="your.package.LogonAction">
<forward name="success" path="logon.jsp" />
</action>
no changes in your web.xml
I hope it helps and works!!
Henrique Viecili
----- Original Message -----
From: "Lawrence Williams" <la...@idil.co.uk>
To: <st...@jakarta.apache.org>
Sent: Friday, December 05, 2003 7:38 AM
Subject: Problems with modules
Hi,
In my web.xml I have defined a default and named module as follows:
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/admin</param-name>
<param-value>/WEB-INF/struts-config-admin.xml</param-value>
</init-param>
And
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
Where index.jsp is simply:
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<logic:forward name="logon"/>
However, it seems that when I request the absolute URL:
http://localhost/myApp/admin/ (i.e. index.jsp)
Struts seems to look in my default struts-config.xml rather than in the module
specific struts-config-admin.xml
i.e. I get
javax.servlet.jsp.JspException: Cannot find global ActionForward for name logon
The global-forward
<global-forwards>
<forward
name="logon"
path="/Logon.do"/>
Is defined in struts-config-admin.xml
I can tell struts is looking in the wrong place because if a make a forward in
thew default config struts resolves the forward....
Any suggestions?
TIA
Lawrence
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 02/12/2003
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org