2 Replies Latest reply on Jun 26, 2006 6:28 AM by Martin Thorpe

    newbie struts error

    Martin Thorpe Newbie

      Hello.

      I am having a frustrating problem with an action. All it is is a simple foward after a query in a bean, but I keep getting forward success not found from the server log. I am sure I am just missing out on something simple here but I just can't see what, below is the situation:

      I have an index doing a redirect:

      <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
      <c:redirect url="activeProfiles.do?dispatch=getActiveProfiles"/>
      


      This is the struts-config bit
      <action
       path="/activeProfiles"
       type="coreservlets.action.ProfileAction"
       parameter="dispatch">
       <forward page="success" path="/display/activeProfiles.jsp"/>
      </action>
      


      I do have the file in the correct directory that struts-config is calling to.

      This is the class bit doing the return
       public ActionForward getActiveProfiles(ActionMapping mapping,ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception{
       logger.debug("getActiveProfiles");
       populateActiveProfiles(request);
       return mapping.findForward("success");
       }
      
       private void populateActiveProfiles(HttpServletRequest request){
       ArrayList activeProfiles;
       try {
       activeProfiles = proService.getActiveProfiles();
       request.setAttribute(Constants.ACTIVEPROFILES,activeProfiles);
       } catch (SQLException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
       }
      
       }
      



      This is the server error that I get when I hit index.jsp:
      2006-06-26 11:57:37,811 INFO [STDOUT] 11:57:37,811 WARN [ActionMapping] Unable to find 'success' forward.
      


      Any help, hints or pointers would be greatly appreciated.

      Thanks for reading.

      cheers
      Martin