struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alessio" <>
Subject mapping.findForward error/bug?
Date Thu, 10 Jul 2003 07:45:15 GMT
Hello all,
i work with Struts(v. 1.1 final)/tiles and EJB
in an Action i call an EJB method to have information to display in page,
after this i find if the user is logged if no i forward to action of
the code:
( note: baseAction contains some utility method as find in the session if
there is the user variable created at login...)
public class example extends baseAction
 public ActionForward execute(ActionMapping mapping,ActionForm form,
HttpServletRequest request, HttpServletResponse response)
        InformationManagerLocal im = ...obtain local
        Collection col = im.getInfoCourses();
        Integer idUser;
       if(super.isLogged(session)){ // control if user is logged
            // i must passing the collection because the login Action create
the layout the page ( with tiles definition )
            // and in the munu i display the info present in collection
            return mapping.findForward("login");
            // where login is an global forward mapping on / ( the
login action )

  other EJB method call
       return mapping.findForward("success");
  }catch(Exception ex){
    return mapping.findForward("error");

Now if i execute this Action i obtain no error but the browser display that
problem, the page not be displayed...
the ejb method work correctly ( i use this in other Action... )
The problem born when i try to call an EJB method and after this i execute
an forward to another fact if i comment the line Collection col
= im.getInfoCourses(); the Action work correctly and the page is display ok
( except the information present in collection :)
But if i use
     return new ActionForward(mapping.findForward("login").getPath(),true);
the Action work ok ( but the url in browser are different and i dislike
Is an problem of mapping.findForward (because if i create an ActionForward
it's work)? Is a bug of 1.1 version? Problem with use EJB if i forward to
another Action after call EJB method?
Any Ideas?
Thanks in advance, Alessio

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message