Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8224

Servlet container should allow welcome file to be a servlet path (not just a physical file)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Rejected
    • Affects Version/s: 6.0.0.M3
    • Fix Version/s: None
    • Component/s: Web (Tomcat) service
    • Labels:
      None
    • Workaround Description:
      Hide

      Create an empty file that matches the name of the Servlet path to trick the Servlet container into forwarding to that path. For instance, to use index.jsf as the welcome page, create an empty file named index.jsf in the directory.

      Show
      Create an empty file that matches the name of the Servlet path to trick the Servlet container into forwarding to that path. For instance, to use index.jsf as the welcome page, create an empty file named index.jsf in the directory.

      Description

      It appears that the Servlet engine is looking for the existence of the welcome file in the web context before forwarding to it. This causes problems if you want to use a JSF view as your welcome file. In JSF, a translation occurs between the actual Servlet path and the view that gets rendered (the view ID). So if my welcome path is index.jsf, then the file is going to be index.xhtml (or whatever the default suffix is for JSF).

      The way I think it should work is that when the last welcome file is being processed, if that file cannot be located, assume it's a servlet path and just forward to it.

      (While I agree the concept of a welcome file should probably be rethought in the Servlet spec, GlassFish supports the requested feature and therefore we should offer it as "add-on" as well).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rmaucher Remy Maucherat
                  Reporter:
                  dan.j.allen Dan Allen
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: