tomcat 5.5; context-path

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

tomcat 5.5; context-path

Pfingstl Gernot
Hi!

I'm preparing to upgrade from tomcat 4.1 to 5.5. I've a lot of apps, which have a context path with subdirectories (e.g. "/dir1/app1" ...) and it seems that tomcat 5.5 doesn't allow this.
In the tomcat 5.5 docs (.../tomcat-docs/config/context.html) in the description of "path" there's the sentence:

 "The value of this field must not be set except when statically defining a Context in server.xml, as it will be infered from the filenames used for either the .xml context file or the docBase."

This seems to me to have only context path with has the same value as the name of the context.xml file.
I want to use context.xml files and not put context information into server.xml.
So isn't it possible to depoly apps in tomcat 5.5 with a context path that has subdirectories?
Is this a feature (why?) - or is this a bug?
If this is a feature - do you have any suggestions, how to configure my tomcat/apache that the directory structure (for the web users) will stay the same?

Thanks, Gernot


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: tomcat 5.5; context-path

qm-2
On Fri, May 06, 2005 at 10:07:32AM +0200, Pfingstl Gernot wrote:
: This seems to me to have only context path with has the same value as the name
: of the context.xml file.
: I want to use context.xml files and not put context information into
: server.xml.
: So isn't it possible to depoly apps in tomcat 5.5 with a context path that has
: subdirectories?

Yes, it is possible. Search the archives for the specifics.  You have to
name your context's XML file a certain way: a special character
represents the dir separators.  

So to map a context to

        /path1/path2/path3

your context XML would be named

        path1{char}path2{char}path3.xml

I think "{char}" is a "#" but don't quote me on that...

-QM

--

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

AW: tomcat 5.5; context-path

Pfingstl Gernot
In reply to this post by Pfingstl Gernot
Thank you!
It works with "#"!
- but is this the 'official' way to do this in future releases? I have not found any docs about this.

Gernot

-----Urspr√ľngliche Nachricht-----
Von: QM [mailto:[hidden email]]
Gesendet: Freitag, 06. Mai 2005 12:58
An: Tomcat Users List
Betreff: Re: tomcat 5.5; context-path


On Fri, May 06, 2005 at 10:07:32AM +0200, Pfingstl Gernot wrote:
: This seems to me to have only context path with has the same value as the name
: of the context.xml file.
: I want to use context.xml files and not put context information into
: server.xml.
: So isn't it possible to depoly apps in tomcat 5.5 with a context path that has
: subdirectories?

Yes, it is possible. Search the archives for the specifics.  You have to
name your context's XML file a certain way: a special character
represents the dir separators.  

So to map a context to

        /path1/path2/path3

your context XML would be named

        path1{char}path2{char}path3.xml

I think "{char}" is a "#" but don't quote me on that...

-QM

--

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]