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

Emit error to log when input forward does not exist

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.5
    • 1.4.0
    • Core
    • None
    • linux, j2se v1.6

    Description

      this happens for example if the action in a html:form tag is not existing in the struts-config.xml

      A reasons for this could be due to a typo.

      Suggestion: if the ForwardConfig lookup in struts-config.xml results in "null", please cite the action string that was used for the lookup .

      The below error message is currently not particularly helpful. Or at least mention something like, "please check your struts-config.xml"

      javax.servlet.ServletException: java.lang.IllegalArgumentException: The path of an ForwardConfig cannot be null
      org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
      org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
      org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

      root cause

      java.lang.IllegalArgumentException: The path of an ForwardConfig cannot be null
      org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:70)
      org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54)
      org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
      org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
      org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
      org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
      org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
      org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
      org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

      Attachments

        Issue Links

          Activity

            People

              pbenedict Paul Benedict
              hauser@acm.org Ralf Hauser
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: