You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/07/02 09:46:29 UTC

[Bug 53495] New: module-name provided with web.xml is not processed

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: violetagg@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53495] module-name provided with web.xml is not processed

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53495

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Using a context path that does not match the name of the WAR triggers all sorts
of nasty edge cases in the automatic deployment code. For this reason, the
Tomcat developers decided long ago that for web applications deployed in the
appBase, the context path MUST be derived from the war/directory  name.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53495] module-name provided with web.xml is not processed

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53495

--- Comment #3 from Violeta Georgieva <vi...@apache.org> ---
ok thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53495] module-name provided with web.xml is not processed

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53495

Violeta Georgieva <vi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29019|0                           |1
           is patch|                            |
  Attachment #29019|application/octet-stream    |text/plain
          mime type|                            |

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53495] module-name provided with web.xml is not processed

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53495

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
I would add that several parts of the specification quoted apply only to
deployment of EAR files, not the deployment of stand-alone modules. Further,
since these are requirements on deployment then it is the Tomcat manager app
where changes - if any - should be made.

It is certainly possible to get the Manager app to scan web.xml and rename
WARs/directories as required but I suspect the volume of code to do this will
be significant compared to the feature it provides - particularly when the user
can define the context path either directly in the Manager app or by renaming
the WAR.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org