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

Cannot access plugin (.jar) static resources via "/struts" or "/static" URL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 2.3.7
    • 2.3.8
    • Dispatch Filter
    • Struts 2.3.7

    • Important

    Description

      I try creating a simple plugin (guided by http://struts.apache.org/2.3.7/docs/plugins.html) with the following structure:

      • src
        • com
          • test
            • TestAction.java
        • WEB-INF
          • content
            • hello.vm
        • static
          • test.js
        • struts-plugin.xml

      Everything works fine (action can be accessed), except I cannot access the static resources using URL: http://host/app_context/static/test.js. I have also tried the "struts/test.js" url, it doesn't work either (shows 404 page). I have also set the "struts.serve.static" constant to "true".

      I have checked the plugin .jar contains the static folder and the test.js file in it.

      Need fix ASAP. Thx

      Attachments

        1. test-plugin.jar
          3 kB
          Yoseph Stephen

        Activity

          People

            Unassigned Unassigned
            dunx Yoseph Stephen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: