Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-3039

Custom Request Processor runs the same request in a loop

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • Example Applications
    • None
    • Resin 3.0.18 and jdk1.5.0_05
    • Important

    Description

      The custom request processor runs the request in a loop. Please find below the custom request processor along with struts configuration.

      – A simple test custom request processor

      public class TestRequestProcessor extends TilesRequestProcessor {
      /**

      • Test custom request processor
      • @param request
      • @param response
      • @param action
      • @param form
      • @param mapping
      • @return
      • @throws IOException
      • @throws ServletException
        */
        public ActionForward processActionPerform(HttpServletRequest request,
        HttpServletResponse response,
        Action action,
        ActionForm form,
        ActionMapping mapping)
        throws IOException, ServletException { // simply forward the request to home page return mapping.findForward("test"); }

      }

      – The struts-config.xml

      <!-- Global Forward -->
      <forward name="test" path="/action/testAction?dispatch=test"
      redirect="false"/>

      <!-- Custom request processor -->
      <controller processorClass="com.test.TestRequestProcessor"/>

      It is observed if the forward path is changed to a non struts mapping path like <forward name="test" path="test.jsp" redirect="false"/> then it is NOT running the request in a loop.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hinaidu Purushotham Naidu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: