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

Tiles uses Class.forName() to load Controller class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1 RC1
    • 1.1 Family
    • Tiles 1 Plugin
    • None
    • Operating System: All
      Platform: All
    • 19070

    Description

      At the end of org.apache.struts.tiles.TilesUtilImpl:

      /**

      • Return the <code>Class</code> object for the specified fully qualified
      • class name, from the underlying class loader.
        *
      • @param className Fully qualified class name to be loaded
      • @return Class object
      • @exception ClassNotFoundException if the class cannot be found
        */
        public Class applicationClass(String className) throws ClassNotFoundException { return Class.forName(className); }

      For some reason this works in Tomcat 4.1.24, but it does not in iPlanet 6.0 Web
      Server SP2. Tiles does not work at all in iPlanet if one uses custom tiles
      controllers.

      Class.forName() is wrong in a webapp context, the Context class loader should be
      used instead (via Thread.currentThread().getContextClassLoader() ).

      The problem is also in HEAD.

      • Renaud

      Attachments

        Activity

          People

            Unassigned Unassigned
            bruyeron@fullsix.com Renaud Bruyeron
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: