Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4160

Construct UnknownHandler using Spring

    XMLWordPrintableJSON

Details

    Description

      I have a custom unknown handler in my struts2 definition (to return a 404 in production if the method is not found). I would like to have the handler constructed by Spring instead of the xwork container though so that I can have some other logging/debugging resources injected.

          <bean type="com.opensymphony.xwork2.UnknownHandler" name="pageNotFoundUnknownHandler" class="com.mycompany.PageNotFoundUnknownHandler"/>
      
          <unknown-handler-stack>
             <unknown-handler-ref name="pageNotFoundUnknownHandler" />
          </unknown-handler-stack>
      

      Attachments

        Activity

          People

            lukaszlenart Lukasz Lenart
            perfnorm Jasper Rosenberg
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: