https://issues.apache.org/bugzilla/show_bug.cgi?id=53495

          Priority: P2
            Bug ID: 53495
          Assignee: dev@tomcat.apache.org
           Summary: module-name provided with web.xml is not processed
          Severity: normal
    Classification: Unclassified
                OS: Mac OS X 10.4
          Reporter: violet...@apache.org
          Hardware: PC
            Status: NEW
           Version: 7.0.28
         Component: Catalina
           Product: Tomcat 7

Created attachment 29019
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29019&action=edit
Patch proposal

Hello,

I'm migrating an application to Tomcat 7.0.28.
The application specifies its module name with web.xml and expects that this
module name will be used as a context root.

According to Java EE Platform 6 Specification:

"
EE.8.1.2 Application Assembly
...
when a stand-alone module is deployed, the module name is used as the
application name, and obeys the same rules as described above for application
names. The module name can be explicitly set in the module deployment
descriptor. If not set, the name of the module is the base name of the module
file with any extension (.war, .jar, .rar) removed and with any directory names
removed.
...
EE.8.4.1 Assembling a Java EE Application
...
If no deployment descriptor is included in the application package, the context
root of the web module will be the module name. 
...
EE.8.5.2 Deploying a Java EE Application
...
All files in the application package with a filename extension of .war are
considered web modules. The context root of the web module is the module name
(see Section EE.8.1.1, “Component Creation”).
...
"

I would like to propose a patch that will read the module-name from the web.xml
and set it as context root. I believe as this is the standard way of specifying
a context root for a web application and it will make the migration to Tomcat
easier.

I'm looking forward to your comments.

Regards
Violeta

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to