Hi everybody, i’ve got the next problem.
I’ve got a 404 when I click on the link that I show below. The action
retrieve the data from model(and it is called), but when redirect it
doesn’t show the jsp.
Persistencia.jsp is on the root , with inicio.jsp
This is my struts-config.xml
…..
<action
input="/Persistencia.jsp" name="persistenciaForm"
parameter="method" path="/Persistencia" scope="request"
type="struts.persistencia.PersistenciaAction"
validate="false">
<set-property
property="inicioResults" value="true"/>
<forward name="mostrado"
path="/Persistencia.jsp" redirect="true"/>
</action>
and the jsp that call the action is …
…
<html:link style="color:blue;" action="/Persistencia.do?method=muestra">
aqui </html:link>
…
the action class is simple
public ActionForward muestra(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
IOException,ServletException
{
//En este método encapsulamos la funcionalidad del controlador
String target=new String("mostrado");
HttpSession s = request.getSession(true);
IPedirHabitaciones pedir =
(IPedirHabitaciones)FactoriaEJB.createEJB("PedirHabitacionesBean");
s.setAttribute("habitaciones",pedir.habitacionesLibres());
System.out.println(mapping.getPath());
return mapping.findForward(target);
}
thanks and best regards