struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Mitchell" <jmitch...@apache.org>
Subject RE: any sample code on struts using sub modules that works?
Date Thu, 06 Mar 2003 20:21:15 GMT
I have a small app for demonstration.  I didn't write it, I only fixed
it for someone else with the same problem.

Unzip the attached file and add the jars (available in the distribution)
to /WEB-INF/lib, then deploy.

It demonstrates only one of several ways you can configure Struts to
jump back and forth between modules.

There are only 2 jsp pages, each linking to the other.  Within each page
is a value pulled from that modules resource bundle.

Have Fun!!!


--
James Mitchell
Web Developer/Struts Evangelist
http://jakarta.apache.org/struts/

"People demand freedom of speech to make up for the freedom of thought
which they avoid."
    - Soren Aabye Kierkegaard (1813-1855)




> -----Original Message-----
> From: khalim@leopard.com [mailto:khalim@leopard.com] 
> Sent: Thursday, March 06, 2003 1:26 PM
> To: 'Struts Users Mailing List'
> Subject: any sample code on struts using sub modules that works?
> 
> 
> Hello,
> 
> I'm trying to use sub modules with struts 1.1 release candidate 1.
> 
> But it's not working now.  It seems that struts cannot read 
> other modules 
> than struts-config.xml.  The error that I get "Cannot 
> retrieve mapping for action /search/advancedSearch' "
> 
> Please let me know if you would happen to know a sample code 
> out there to 
> make this works.
> Thank you!
> 
> /WEB-INF/struts-config.xml
> /WEB-INF/modules/struts-config-search.xml
> ------------------------------------
>     <init-param>
>       <param-name>config</param-name>
>       <param-value>/WEB-INF/struts-config.xml</param-value>
>     </init-param>
>     <init-param>
>       <param-name>config/search</param-name>
>       
> <param-value>/WEB-INF/modules/struts-config-search.xml</param-value>
>     </init-param>
> ------------------------------------
>     <form-beans>
>         <form-bean name="advanced-search" 
> type="org.myclass.AdvancedSearchForm"/>
>     </form-beans>
> 
>     <action-mappings>
>         <action path="/advancedSearch"
>                 type="org.myclass.AdvancedSearchAction"
>                 name="advanced-search"
>                 input="/search/advanced.jsp"
>                 scope="request">
>             <forward contextRelative="true" name="success" 
> path="/success.jsp"/>
>             <forward name="failure" 
> path="/app/home/search/advanced.jsp"/>
>         </action>
>     </action-mappings>
> ------------------------------------
> <html:form action="/search/advancedSearch.do">
> 
>         [bunch of form properties]
> 
> </html:form>
> 
> 

Mime
View raw message