RE: tomcat 6 and subdirectories

2008-10-24 Thread Angelov, Rossen
Chuck,

Thanks for the advise, I fixed the problem. IT was definitely related to
the way contexts were defined and not to the servlet mappings. Some of
your replies to older postings helped me figure out the problem.

As a solution, I put the context files for the applications in
conf/Catalina/[host]/[appName].xml as described in
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

It didn't work right away. I had to remove the appBase attribute from
the host definition and provide an absolute path in the context's
docBase. After that everything worked as expected and all subdirectories
mapped to the proper servlet.

Thanks,
Ross

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 23, 2008 5:49 PM
To: Tomcat Users List
Subject: RE: tomcat 6 and subdirectories

 From: Angelov, Rossen [mailto:[EMAIL PROTECTED]
 Subject: RE: tomcat 6 and subdirectories

 I will try in META-INF/context.xml, although how do you
 specify multiple contexts in this case?

There's a separate META-INF directory in each webapp, so each gets its
own context.xml file.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
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]



RE: tomcat 6 and subdirectories

2008-10-24 Thread Caldarale, Charles R
 From: Angelov, Rossen [mailto:[EMAIL PROTECTED]
 Subject: RE: tomcat 6 and subdirectories

 I had to remove the appBase attribute from the host definition
 and provide an absolute path in the context's docBase.

That's not right.  Each Host should have an appBase; you just need to insure 
that your webapps are installed somewhere else than under the appBase settings.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



RE: tomcat 6 and subdirectories

2008-10-24 Thread Angelov, Rossen
OK, I will put the appBase back in the host.

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 24, 2008 3:38 PM
To: Tomcat Users List
Subject: RE: tomcat 6 and subdirectories

 From: Angelov, Rossen [mailto:[EMAIL PROTECTED]
 Subject: RE: tomcat 6 and subdirectories

 I had to remove the appBase attribute from the host definition
 and provide an absolute path in the context's docBase.

That's not right.  Each Host should have an appBase; you just need to
insure that your webapps are installed somewhere else than under the
appBase settings.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
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]



RE: tomcat 6 and subdirectories

2008-10-23 Thread Angelov, Rossen
Thanks Chuck,

It is in server.xml and may that's the problem. In previous version I
had in subdirectories under conf/Catalina.

I will try in META-INF/context.xml, although how do you specify multiple
contexts in this case?

Ross

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 20, 2008 2:18 PM
To: Tomcat Users List
Subject: RE: tomcat 6 and subdirectories

 From: Angelov, Rossen [mailto:[EMAIL PROTECTED]
 Subject: RE: tomcat 6 and subdirectories

 I have the feeling it's not the pattern, but
 something else that's causing this problem.

Are you still specifying an empty docBase?  That's illegal.

Where is your Context element located?  It should not be in server.xml
(strongly discouraged, but not yet illegal), but rather in the webapp's
META-INF/context.xml file.  Note that the path attribute is not allowed
when the Context is in the proper location.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
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]



RE: tomcat 6 and subdirectories

2008-10-23 Thread Caldarale, Charles R
 From: Angelov, Rossen [mailto:[EMAIL PROTECTED]
 Subject: RE: tomcat 6 and subdirectories

 I will try in META-INF/context.xml, although how do you
 specify multiple contexts in this case?

There's a separate META-INF directory in each webapp, so each gets its own 
context.xml file.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



RE: tomcat 6 and subdirectories

2008-10-20 Thread Caldarale, Charles R
 From: Angelov, Rossen [mailto:[EMAIL PROTECTED]
 Subject: RE: tomcat 6 and subdirectories

 I have the feeling it's not the pattern, but
 something else that's causing this problem.

Are you still specifying an empty docBase?  That's illegal.

Where is your Context element located?  It should not be in server.xml 
(strongly discouraged, but not yet illegal), but rather in the webapp's 
META-INF/context.xml file.  Note that the path attribute is not allowed when 
the Context is in the proper location.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



Re: tomcat 6 and subdirectories

2008-10-16 Thread Johnny Kewl


- Original Message - 
From: Angelov, Rossen [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, October 15, 2008 8:29 PM
Subject: tomcat 6 and subdirectories



Hi,

I recently started using Tomcat 6 but can't configure it to map
subdirectories to same servlet within the default context. I didn't have
problems with the same setup in Tomcat 5.

Here is an example.

http://mysite/test.html - maps to the application servlet and works as
expected
http://mysite/directory/test.html - doesn't maps to the application
servlet and fails to display correctly

The second link works only after I create an additional context, but
it's not an acceptable solution because there are many directories in
application base.

Context path=directory docBase= /

In web.xml I have the following servlet mapping:

servlet-mapping
  servlet-nameappServlet/servlet-name
  url-pattern*.html/url-pattern
/servlet-mapping

I tried different url patters to match subdirectories, but neither one
worked:
url-pattern/*/url-pattern
url-pattern/directory/*/url-pattern
url-patterndirectory/*/url-pattern


Ross Try
   servlet-mapping
   servlet-nameappServlet/servlet-name
   url-pattern*.htm/url-pattern
   /servlet-mapping
   servlet-mapping
   servlet-nameappServlet/servlet-name
   url-pattern/directory/*/url-pattern
   /servlet-mapping

ie just map it more than once
I havnt noticed a change in behaviour between TC's... using the multi 
mapping idea above, maybe some other subtle thing happening as well...


---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---
If you cant pay in gold... get lost...
http://coolharbor.100free.com/debt/usadebt.htm 



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



tomcat 6 and subdirectories

2008-10-15 Thread Angelov, Rossen
Hi,

I recently started using Tomcat 6 but can't configure it to map
subdirectories to same servlet within the default context. I didn't have
problems with the same setup in Tomcat 5.

Here is an example.

http://mysite/test.html - maps to the application servlet and works as
expected
http://mysite/directory/test.html - doesn't maps to the application
servlet and fails to display correctly

The second link works only after I create an additional context, but
it's not an acceptable solution because there are many directories in
application base.

Context path=directory docBase= /

In web.xml I have the following servlet mapping:

servlet-mapping
  servlet-nameappServlet/servlet-name
  url-pattern*.html/url-pattern
/servlet-mapping

I tried different url patters to match subdirectories, but neither one
worked:
url-pattern/*/url-pattern
url-pattern/directory/*/url-pattern
url-patterndirectory/*/url-pattern




Any help is appreciated.

Thanks,
Ross

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]