You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vincent PROSPER <Vi...@Alkinos.com> on 2002/10/24 18:39:10 UTC
[sub-apps] smthg missing... (?)
Hi,
This is a newbie question about sub-apps in struts 1.1.b2...
I have got two webapps, named portal.war and listing.war and I want
listing.war to become a sub-app of portal.war (does it make sense or am I
misunderstanding something?)
So what I basically did in the portal project is:
**************************
**** web.xml (portal) ****
**************************
...
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<!-- List of Subapps -->
<init-param>
<param-name>config/listing</param-name>
<param-value>/WEB-INF/struts-listing-config.xml</param-value>
</init-param>
...
***********************
**** struts-config ****
***********************
<global-forwards type = "org.apache.struts.action.ActionForward">
...
<!-- Accessing listing webapp -->
<forward contextRelative="true"
name="toListing"
path="/listing/index.do"
redirect="true"/>
</global-forwards>
*******************************
**** struts-listing-config ****
*******************************
<action-mappings>
<!-- For outside access -->
<action path="/index"
parameter="/putlisting.jsp"
type="org.apache.struts.action.ActionForward">
</action>
(I also tried with <action path="/index" forward="/putlisting.jsp"/>)
...
</action-mappings>
*********************
**** a jsp page *****
*********************
...
<html:link forward="toListing">go to listing</html:link>
...
OK ? (this obviously means that I didn't touch anything in listing.war, only
in portal.war)
Now, when I click this link (which refers to
http://localhost:8080/portal/listing/index.do), I get a '404/not found'
error...
So, my questions are the following:
1. I tried to put listing.war in WEB-INF/lib/ of my portal.war. Is doesn't
work (404), but is it the right way to point to a so called "sub-app" ?
2. I tried to put listing.war in server/default/deploy. The link doesn't
work neither (404), why ?
3. Considering that for 1/ and 2/ I get a dead link, what am I missing (I
didn't find anything more in
http://jakarta.apache.org/struts/userGuide/building_controller.html#dd_confi
g_modules, neither in
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg41762.html?)
Thanks in advance for providing tips to a newbie sub-apper ;-)
Vince
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>