Me paso lo siguientes, os mando los ficheros que intervien:
este es mi struts-config.xml
<?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>
<data-sources />
<form-beans>
<form-bean name="logonForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="usuario" type="java.lang.String"/>
<form-property name="password" type="java.lang.String"/>
</form-bean>
</form-beans>
<global-exceptions />
<global-forwards>
<forward name="login" path="/jsp/login/login.jsp" redirect="true"/>
</global-forwards>
<action-mappings>
<action path="/login"
type="test.administraccion.model.negoci.UsuariVali darAccio"
name="logonForm"
scope="request"
validate="true"
parameter="loginProcess">
<forward name="success" path="/index.jsp" redirect="true"/>
</action>
</action-mappings>
<controller bufferSize="4096" debug="0" />
<message-resources parameter="test.arq.config.ApplicationResources" />
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-parser-validate" value="true" />
<set-property property="moduleAware" value="true" />
</plug-in>
</struts-config>
Esta es la clase UsuariValidarAccio:
//Source file: C:\\dev\\projects\\INP\\JavaSource\\gencat\\inp\\a dministracio\\model\\negoci\\UsuariValidarAccio.ja va
package test.administraccion.model.negoci;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.DynaActionForm;
import test.arq.model.negoci.AccioBase;
public class UsuariValidarAccio extends AccioBase {
static Logger logger = Logger.getLogger(UsuariValidarAccio.class);
public ActionForward executeOperation(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
DynaActionForm dynForm = (DynaActionForm) form;
ActionForward actionForward = null;
String usarioDeForm = (String) dynForm.get("usuario");
String passwordDeForm = (String) dynForm.get("password");
dynForm.reset(mapping, request);
if (usarioDeForm == null || usarioDeForm.equals("")) {
//this.messages.add("error", new ActionMessage("errors.userio.loginError"));
return mapping.findForward("login");
}
logger.debug("Intento hacer un login de usario/password:" + usarioDeForm + "/" + passwordDeForm);
actionForward = mapping.findForward("success");
return actionForward;
}
public boolean checkUser(HttpServletRequest request) {
return true;
}
public boolean checkSession(HttpServletRequest request) {
return true;
}
}
Si en el path del explorer pongo http://localhost:8080/TestPrueba/login.do se queda la pantalla blanco, pero en cambio si pongo http://localhost:8080/TestPrueba/jsp/login/login.jsp si que puedo ver los cambios tengo puesto en la clase un breakpoint en la linea "DynaActionForm dynForm = (DynaActionForm) form;" para ver que hace y no se para en ese punto.
Alguien me puede ayudar