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

Cannot use rebuilt struts-blank example; doesn't work because of bad message-resource parameter.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 1.2.4
    • None
    • Example Applications
    • None
    • Operating System: Windows XP
      Platform: PC
    • 32484

    Description

      I downloaded and installed Tomcat 5.5.4.
      I downloaded struts 1.2.4, and dropped the .war files in Tomcat's webapps dir.
      I went to "http://localhost:8080/struts-blank" and got the welcome message.
      All is well so far.

      Now opened a DOS window, went to <Tomcat-webapps-dir>/struts-blank/WEB-
      INF/src, and ran "ant all" (using ant 1.6.1). This generates a new .war file
      in "c:/projects/lib" called "blank.war". I took that .war file and dropped it
      into Tomcat's webapps dir.
      Then I went to "http://localhost:8080/blank" but now I got an error
      complaining about missing resources (welcome.title).

      After some searching, I found the problem. The struts-config.xml file that
      comes within the struts-blank.war of the struts 1.2.4 distribution has the
      following line:

      <message-resources parameter="MessageResources" />

      Indeed, in the struts-blank.war file, the resource file is called
      MessageResources.properties, but in the WEB-INF/classes/resources directory,
      the file there is called application.properties.
      <message-resources parameter="resources.application" />

      Attachments

        Activity

          People

            Unassigned Unassigned
            megmond@randomwalk.com Maarten@RW
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: