Angelov, Rossen wrote:
Thank you for explaining about the META-INF location. Mine is following
exactly the same pattern as you described, but still the servlet
mappings are not functioning when using the META-INF/context.xml.

When you define a Context inside the Host, the path attribute is permitted. When you define a Context elsewhere the path attribute is not permitted, (as Chris explained), but the path is defined by the directory name, or the .war file name.

ROOT is a special name for the default context, it's upper case and is the means used to define the default context. You can't define the default context using another name if you're using the recommended method of deploying a context.

Hence my example below.

p


(p.s. just reply to the group, not me as well.)



Do you have any clues why this could be happening? The mappings work
fine when inside the host element in server.xml.

Ross

-----Original Message-----
From: Pid [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 5:25 PM
To: Tomcat Users List
Subject: Re: context.xml locations and servlet mappings


One META-INF/context.xml per Context is the intended usage.

The appBase "../your/app/base" should contain:

.../app/base/ROOT/index.jsp
.../app/base/ROOT/WEB-INF/web.xml
.../app/base/ROOT/META-INF/context.xml

.../app/base/Other/index.jsp
.../app/base/Other/WEB-INF/web.xml
.../app/base/Other/META-INF/context.xml


for "/index.jsp" and "/Other/index.jsp", where ROOT is the location for
the default Context.


p




Angelov, Rossen wrote:
Chris,

This didn't help. Removing them is not generating errors, the servlet
still loads on startup, but then the mapping don't work.
It doesn't make sense to remove the path and the docBase. Especially
the
docBase, it specifies the Context Root. If it's empty, it probably
uses
the host appBase for root, but this is incorrect. I should be able to
specify the context root. What about the cases when there are more
than
one contexts per host?

The problem seems to be somewhere else, but thanks for the advise.

Ross

-----Original Message-----
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 4:46 PM
To: Tomcat Users List
Subject: Re: context.xml locations and servlet mappings

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ross,

Angelov, Rossen wrote:
META-INF/context.xml
                  <Context path="" docBase="html" debug="0"
privileged="true">

Take out the "path" and "docBase" parameters. They are either illegal
or
ill-advised when using META-INF/context.xml.

This might not be /the/ problem, but you should definitely remove
those
two attributes.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGZIgZ9CaO5/Lv0PARAoQoAKCIs1myORR5N3hhQAaBcEsyOZmi6ACfXMrx
HUvaShUKZFwX385E0A1dq98=
=3Rfo
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


"This communication is intended solely for the addressee and is
confidential and not for third party unauthorized distribution"
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




"This communication is intended solely for the addressee and is confidential and not 
for third party unauthorized distribution"

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to