You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "ced_the.bear" <ce...@caramail.com> on 2005/03/31 18:03:01 UTC
[Struts-Faces] Integration problem with Actions.
Context : I want to gradually migrate a Web Application from Struts & Tiles, to JSF, struts-faces & Tiles.
To do so, I want first to migrate from a Struts sequence "StrutsAction1 -> StrutsJsp -> StrutsAction2" to a combined one "StrutsAction1" -> FacesJsp -> StrutsAction2.
It's OK for the first step "StrutsAction1 to FacesJsp" but I encounter problems for the second one "FacesJsp -> StrutsAction2" even if I don't consider tiles in a first step. When I submit my form, I get a 404 error.
It looks like the processor is not able to find the action. In FacesJsp the struts-faces form tag <s:form action="/StrutsAction2"> generates the following html <form action="/FacesJsp.do">
I would expect a FacesJsp.faces to be rendered instead of FacesJsp.do like it is done when you call the .faces page from a JSF context.
My config is as follows : The FacesTilesRequestProcessor is declared in struts-config.xml
In web.xml, the struts servlet is called on .do extension, and the faces one called on .faces I use a form-bean to represent the data : myFormBean
in struts-config.xml the actions are declared like that :
<action path="/StrutsAction1"
type="StrutsAction1Type"
scope="request"
input="aJSPpage"
name="myFormBean"
validate="false">
<forward name="success" path="/FacesJsp.faces"/>
</action>
<action path="/StrutsAction2"
type="StrutsAction2Type"
scope="request"
input="FacesJsp.faces"
name="myFormBean"
validate="false">
<forward name="success" path="/FacesJsp.faces"/>
</action>
I wonder if it would not be a context relating issue :
- when coming from a struts context, the encodeURL encode the action with a .do
- when coming from a Faces context, the encodeURL encode the action with a .faces But i don't understand how to get the second one in the html rendered code. Does Someone know how to do that ?
Ced
C est le moment de dynamiser votre bo�te mail en d�couvrant les offres CaraMail Max et Pro - http://www.caramail.com