Hello,

I'm trying to use sub modules with struts 1.1 release candidate 1.

After applying code according to O'Reilly documentation at 
http://www.onjava.com/pub/a/onjava/pub/a/2002/11/06/struts1.html?page=2, 
into my application, I'm still getting "Cannot retrieve mapping for action 
/search/advancedSearch' " error.
It seems that it cannot read the sub modules that I specified.

Does anybody have any idea how to make this work ?
Please help!!
Thank you!

Here is my code and how I setup my directory...

/WEB-INF/struts-config.xml
/WEB-INF/modules/struts-config-search.xml

==============================
web.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>


==============================
struts-config.xml
==============================
[ just bunch of global forward ]


==============================
struts-config-search.xml
==============================
<struts-config>

    <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="/app/home/search/search_result.jsp"/>
            <forward name="failure" path="/app/home/search/advanced.jsp"/>
        </action>
    </action-mappings>

    <plug-in className="org.apache.struts.tiles.TilesPlugin">
      <set-property property="definitions-config" 
value="/WEB-INF/tiles-defs/default_template_defs.xml"/>
      <set-property property="definitions-debug" value="2"/>
      <set-property property="definitions-parser-details" value="2"/>
      <set-property property="definitions-parser-validate" value="true"/>
    </plug-in>

</struts-config>

==============================
advanced.jsp
==============================
<html:form action="/search/advancedSearch.do">

[bunch of form properties]

</html:form>

Reply via email to