Configuración de puntales con mosaicos

My struts-config.xml has a few forward actions that point to tiles definitions. Everything seems to be going alright until the forward gets resolved to the tiles definition name instead of the jsp the definition points to.

From struts-config.xml

<action-mappings>
    <action name="userTokenForm" path="/createtoken" type="com.bcbst.providertokenweb.actions.CreatetokenAction" 
            scope="request" parameter="action" input="registration.provider.createtoken" validate="true">

       <forward name="createtokens" path="registration.provider.createtoken"></forward>
       <forward name="success" path="registration.provider.success" redirect="false"></forward>
    </action>
</action-mappings>

From tiles-defs.xml

<definition name="registration.provider.main" page="/theme/bcbst/template.jsp">
  <put name="body" value="/default.jsp"/>
</definition>

<definition name="registration.provider.createtoken" page="/theme/bcbst/template.jsp">
  <put name="body" value="/createtoken.jsp"/>
</definition>

<definition name="registration.provider.success" page="/theme/bcbst/template.jsp">
  <put name="body" value="/success.jsp"/>
</definition>

When the createtokens forward gets called, a 404 is thrown saying /registration.provider.createtoken doesn’t exist.

preguntado el 09 de marzo de 12 a las 15:03

2 Respuestas

Compruebe las siguientes cosas:

1) Are you returning the ActionForward like this :

return mapping.findForward("createtokens"); 

2) Did you add tiles plugin and controller processor in your struts-config.xml ?

<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>

<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" />
</plug-in>

3) Do you have these JSP files at correct place (inside project context) ?

/createtoken.jsp

/theme/bcbst/template.jsp

respondido 10 mar '12, 17:03

tratar de cambiar el página atribuir a camino

Respondido 21 Jul 12, 22:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.