Tengo el siguiente problema en mi aplicación:
11:18:16,828 ERROR [Engine] StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
java.lang.IllegalArgumentException: Path PrincipalDef does not start with a "/" character
struts-config:
Código HTML:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> <form-beans> <form-bean name="loginForm" type="com.enelbar.seguridad.struts.LoginForm" /> <form-bean name="principalForm" type="com.enelbar.seguridad.struts.PrincipalForm" /> </form-beans> <global-forwards> <forward name="cerrarsesion" path="/CerrarSesion.jsp" /> </global-forwards> <action-mappings> <action input="/Login.jsp" name="loginForm" path="/Login" scope="request" type="com.enelbar.seguridad.struts.LoginAction" validate="false"> <forward name="mostrar" path="/Login.jsp" /> <forward name="mostrarprincipal" path="PrincipalDef" /> </action> <action input="/Principal.jsp" name="principalForm" path="/Principal" scope="request" type="com.enelbar.seguridad.struts.PrincipalAction" validate="false"> <forward name="mostrarprincipal" path="PrincipalDef" /> </action> </action-mappings> </struts-config>
Código HTML:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd"> <tiles-definitions> <definition name="index" path="/layout.jsp"> <put name="title" value="SIAR" /> <put name="header" value="/header.jsp" /> <put name="nombrePagina" value=" " /> <put name="leftmenu" value="/leftmenu.jsp" /> <put name="body" value="/index.jsp" /> <put name="footer" value="/footer.jsp" /> </definition> <definition name="tituloHeader" path="/header.jsp"> <put name="nombreMostrar" value=">> Seguridad" /> </definition> <definition extends="index" name="PrincipalDef" path="/layout.jsp"> <put name="nombrePagina" value="Principal" /> <put name="body" value="/Principal.jsp" /> <put name="header" value="tituloHeader" /> </definition> </tiles-definitions>
Código:
. . . return actionMapping.findForward(mostrarprincipal);
Por favor agradeceria enormemente su ayuda, he revisado de todo y nada q logro resolver.