T
Thomas Lutz
hi everybody,
thanks in advance for all help.
i have set up a web application using struts and tiles.
i copied the change locale class from the struts example app
validator, and got it running.
my problem is:
i'd like to return to the page, better, the action, where i clicked
the link "switch to english/germant/whatever".
and i am not able to determine in my "tiled" jsps which action was
called.
example:
1.call http://localhost:8080/_core/displaytag.test
2.struts maps and takes me to the tile
3.request.getRequestURI says i am in /_core/templates/main.jsp and not
in /_core/displaytag.simple.do
how do i get the info "displaytag.simple.do" ?
thank you,
tom lutz
p.s.: config files following:
<struts-config>
<form-beans>
<!-- Locale form bean -->
<form-bean name="localeForm"
type="org.apache.struts.action.DynaActionForm">
<form-property name="language" type="java.lang.String" />
<form-property name="country" type="java.lang.String" />
<form-property name="page" type="java.lang.String" />
</form-bean>
</form-beans>
<!-- =========================================== Global Forward
Definitions -->
<global-forwards>
<!-- Default forward to "Welcome" action -->
<!-- Demonstrates using index.jsp to forward -->
<forward name="welcome" path="/Welcome.do" />
</global-forwards>
<!-- =========================================== Action Mapping
Definitions -->
<action-mappings>
<!-- Default "Welcome" action -->
<!-- Forwards to Welcome -->
<action path="/Welcome" forward=".aim.core.welcome" />
<!-- test forwards -->
<action path="/displaytag.simple"
type="org.apache.struts.actions.ForwardAction"
parameter=".aim.core.test.displaytag.simple" />
<!-- Locale Action -->
<action path="/locale"
type="com.aimfinsysag.web.broker.LocaleAction" name="localeForm"
scope="request">
<forward name="success" path=".aim.core.welcome" />
</action>
</action-mappings>
<!-- ===================================== Controller Configuration
-->
<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"
/>
<!-- ================================ Message Resources Definitions
-->
<message-resources parameter="resources.application" />
<message-resources parameter="resources.menu" key="resources.menu"
/>
<!-- ======================================= Plug Ins Configuration
-->
<!-- ========== Tiles plugin =================== -->
<!-- -->
<!--
-->
<!-- comment following if struts1.0.x -->
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
<set-property property="definitions-parser-validate" value="true" />
</plug-in>
<!-- end comment if struts1.0.x -->
<!-- ========== Struts-Menu Plugin ============= -->
<!-- -->
<plug-in className="net.sf.navigator.menu.MenuPlugIn">
<set-property property="menuConfig" value="/WEB-INF/menu-config.xml"
/>
</plug-in>
</struts-config>
<tiles-definitions>
<!-- ======================================================= -->
<!-- Master definition -->
<!-- ======================================================= -->
<!-- Doc index page description -->
<definition name=".aim.core.main" path="/templates/main.jsp">
</definition>
<!-- ======================================================= -->
<!-- Main page body definitions -->
<!-- ======================================================= -->
<definition name=".aim.core.welcome" extends=".aim.core.main">
<put name="content" value="/templates/welcome.jsp" />
</definition>
<definition name=".aim.core.test.displaytag.simple"
extends=".aim.core.main">
<put name="content" value="/templates/displaytag/simple.jsp" />
</definition>
</tiles-definitions>
thanks in advance for all help.
i have set up a web application using struts and tiles.
i copied the change locale class from the struts example app
validator, and got it running.
my problem is:
i'd like to return to the page, better, the action, where i clicked
the link "switch to english/germant/whatever".
and i am not able to determine in my "tiled" jsps which action was
called.
example:
1.call http://localhost:8080/_core/displaytag.test
2.struts maps and takes me to the tile
3.request.getRequestURI says i am in /_core/templates/main.jsp and not
in /_core/displaytag.simple.do
how do i get the info "displaytag.simple.do" ?
thank you,
tom lutz
p.s.: config files following:
<struts-config>
<form-beans>
<!-- Locale form bean -->
<form-bean name="localeForm"
type="org.apache.struts.action.DynaActionForm">
<form-property name="language" type="java.lang.String" />
<form-property name="country" type="java.lang.String" />
<form-property name="page" type="java.lang.String" />
</form-bean>
</form-beans>
<!-- =========================================== Global Forward
Definitions -->
<global-forwards>
<!-- Default forward to "Welcome" action -->
<!-- Demonstrates using index.jsp to forward -->
<forward name="welcome" path="/Welcome.do" />
</global-forwards>
<!-- =========================================== Action Mapping
Definitions -->
<action-mappings>
<!-- Default "Welcome" action -->
<!-- Forwards to Welcome -->
<action path="/Welcome" forward=".aim.core.welcome" />
<!-- test forwards -->
<action path="/displaytag.simple"
type="org.apache.struts.actions.ForwardAction"
parameter=".aim.core.test.displaytag.simple" />
<!-- Locale Action -->
<action path="/locale"
type="com.aimfinsysag.web.broker.LocaleAction" name="localeForm"
scope="request">
<forward name="success" path=".aim.core.welcome" />
</action>
</action-mappings>
<!-- ===================================== Controller Configuration
-->
<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"
/>
<!-- ================================ Message Resources Definitions
-->
<message-resources parameter="resources.application" />
<message-resources parameter="resources.menu" key="resources.menu"
/>
<!-- ======================================= Plug Ins Configuration
-->
<!-- ========== Tiles plugin =================== -->
<!-- -->
<!--
-->
<!-- comment following if struts1.0.x -->
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
<set-property property="definitions-parser-validate" value="true" />
</plug-in>
<!-- end comment if struts1.0.x -->
<!-- ========== Struts-Menu Plugin ============= -->
<!-- -->
<plug-in className="net.sf.navigator.menu.MenuPlugIn">
<set-property property="menuConfig" value="/WEB-INF/menu-config.xml"
/>
</plug-in>
</struts-config>
<tiles-definitions>
<!-- ======================================================= -->
<!-- Master definition -->
<!-- ======================================================= -->
<!-- Doc index page description -->
<definition name=".aim.core.main" path="/templates/main.jsp">
</definition>
<!-- ======================================================= -->
<!-- Main page body definitions -->
<!-- ======================================================= -->
<definition name=".aim.core.welcome" extends=".aim.core.main">
<put name="content" value="/templates/welcome.jsp" />
</definition>
<definition name=".aim.core.test.displaytag.simple"
extends=".aim.core.main">
<put name="content" value="/templates/displaytag/simple.jsp" />
</definition>
</tiles-definitions>