RE: newbie q why this doesn`t work?

2003-06-19 Thread Mike Jasnowski
Are you by chance using a dispatch action? From appearances you might be.
In the case of DispatchActions when it can't find the method you named, it
calls a supplied method named unspecified(). The default implementation of
this method returns a 404 I believe.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 2:17 PM
To: 'Struts Users Mailing List'
Subject: newbie q why this doesn`t work?


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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: newbie q why this doesn`t work?

2003-06-19 Thread ruben
Thanks Mike,

But i think that it find it because it do the work of the method
muestra, I mean, it call the EJB, and do the work of this DispatchAction
method, it redirect to a 404 for target mostrado.


-Mensaje original-
De: Mike Jasnowski [mailto:[EMAIL PROTECTED] 
Enviado el: jueves, 19 de junio de 2003 20:20
Para: Struts Users Mailing List
Asunto: RE: newbie q why this doesn`t work?

Are you by chance using a dispatch action? From appearances you might
be.
In the case of DispatchActions when it can't find the method you named,
it
calls a supplied method named unspecified(). The default
implementation of
this method returns a 404 I believe.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 2:17 PM
To: 'Struts Users Mailing List'
Subject: newbie q why this doesn`t work?


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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]