RE: Need help exporting contexts not under webapps/

2005-04-19 Thread Raghupathy,Gurumoorthy
Not clear what you want.

Send me the details

Where is your static document ( The directory )
How do want to access it ? ( the URL )  
Which version of TOMCAT YOU ARE USING 
Send me your server.xml 

Regards
Guru 

-Original Message-
From: J. Ryan Earl [mailto:[EMAIL PROTECTED] 
Sent: 18 April 2005 19:16
To: tomcat-user@jakarta.apache.org
Subject: Need help exporting contexts not under webapps/


Hello,

I'm in the process of bringing an in-house application up under Tomcat.
Previously we were using Jetty as the servlet container, but for various
reason I'm trying to get said application running with Tomcat 5.5.9 and Java
1.5.0.

The problem I'm having is that there are two directories with a large amount
of static files (pictures, videos, documents, and other forms of media) that
are mounted outside of the webapps/ home.  Under Jetty, there is a
configuration directive that I can use to export these directories under a
URL path.  I'm trying to do that in Tomcat, and the documentation has been
somewhat confusing.

What I've gathered is that this type of configuration should be put under
${CATALINA_HOME}/conf/context.xml however I have been able to do this
successfully.  I've tried putting the following in context.xml but it gives
me errors:

Context path=/DOCS docBase=/mnt/CMFiles/DOCS
 debug=0
/Context

So my question is, in short, given a directory structure of static files,
how do you get Tomcat to serve said static content off of an arbitrary URI?
Ideas?

Thanks in advance,
-ryan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Need help exporting contexts not under webapps/

2005-04-19 Thread Fritz Schneider
Guru,

Earl isn't the only one trying to do this. Here are the details for my
attempts which may or may not be similar to his:

 - Running TC 5.5.8, JVM 1.5.0_02-b09 under Win XP Pro SP2
 - I have a set of static pages (starting with index.htm) stored at
C:\www\aegean
 - C:\www\agean\WEB-INF\web.xml contains web-app/
 - I wish to access them as http://www.peacham.com/aegean
 - aegean is just one of many such directories.
 - It works if I copy it to {TOMCAT_BASE}\webapps\aegean but that creates
maintenance headaches by coupling the TC directory structure to the web site
directory structure.
 - I have tried building a webapps/aegean directory with just WEB-INF and
adding aegean.xml to {TOMCAT-BASE}\conf\Catalina\localhost containing:

?xml version=1.0 encoding=UTF-8?
Context
path=/aegean docbase=c:/www/aegean
reloadable=true
  WatchedResourceWEB-INF/web.xml/WatchedResource
/Context

but all I get is 404 errors and no hint of other errors in the logs. I have
tried a couple of variations with equally poor results.

Thanks for any help you can give

Fritz

-Original Message-
From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED]

Sent: Tuesday, April 19, 2005 1:10 AM
To: 'Tomcat Users List'
Subject: RE: Need help exporting contexts not under webapps/

Not clear what you want.

Send me the details

Where is your static document ( The directory )
How do want to access it ? ( the URL )  
Which version of TOMCAT YOU ARE USING 
Send me your server.xml 

Regards
Guru 

-Original Message-
From: J. Ryan Earl [mailto:[EMAIL PROTECTED] 
Sent: 18 April 2005 19:16
To: tomcat-user@jakarta.apache.org
Subject: Need help exporting contexts not under webapps/


Hello,

I'm in the process of bringing an in-house application up under Tomcat.
Previously we were using Jetty as the servlet container, but for various
reason I'm trying to get said application running with Tomcat 5.5.9 and Java
1.5.0.

The problem I'm having is that there are two directories with a large amount
of static files (pictures, videos, documents, and other forms of media) that
are mounted outside of the webapps/ home.  Under Jetty, there is a
configuration directive that I can use to export these directories under a
URL path.  I'm trying to do that in Tomcat, and the documentation has been
somewhat confusing.

What I've gathered is that this type of configuration should be put under
${CATALINA_HOME}/conf/context.xml however I have been able to do this
successfully.  I've tried putting the following in context.xml but it gives
me errors:

Context path=/DOCS docBase=/mnt/CMFiles/DOCS
 debug=0
/Context

So my question is, in short, given a directory structure of static files,
how do you get Tomcat to serve said static content off of an arbitrary URI?
Ideas?

Thanks in advance,
-ryan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Need help exporting contexts not under webapps/

2005-04-19 Thread Raghupathy,Gurumoorthy
Hello,

In your aegean.xml  try 

?xml version=1.0 encoding=UTF-8?
Context
path=/aegean docbase=c:\www\aegean
reloadable=true
  WatchedResourceWEB-INF/web.xml/WatchedResource

/Context

and then stop and start tocmat. 
Go to the manager application and see if you can see the application
started ? 
if not try to start it. If yes then try the link
http://www.peacham.com/aegean
If it does not look into the logs 


Regards
Guru 

-Original Message-
From: Fritz Schneider [mailto:[EMAIL PROTECTED] 
Sent: 19 April 2005 13:25
To: 'Tomcat Users List'
Subject: RE: Need help exporting contexts not under webapps/


Guru,

Earl isn't the only one trying to do this. Here are the details for my
attempts which may or may not be similar to his:

 - Running TC 5.5.8, JVM 1.5.0_02-b09 under Win XP Pro SP2
 - I have a set of static pages (starting with index.htm) stored at
C:\www\aegean
 - C:\www\agean\WEB-INF\web.xml contains web-app/
 - I wish to access them as http://www.peacham.com/aegean
 - aegean is just one of many such directories.
 - It works if I copy it to {TOMCAT_BASE}\webapps\aegean but that creates
maintenance headaches by coupling the TC directory structure to the web site
directory structure.
 - I have tried building a webapps/aegean directory with just WEB-INF and
adding aegean.xml to {TOMCAT-BASE}\conf\Catalina\localhost containing:

?xml version=1.0 encoding=UTF-8?
Context
path=/aegean docbase=c:/www/aegean
reloadable=true
  WatchedResourceWEB-INF/web.xml/WatchedResource
/Context

but all I get is 404 errors and no hint of other errors in the logs. I have
tried a couple of variations with equally poor results.

Thanks for any help you can give

Fritz

-Original Message-
From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED]

Sent: Tuesday, April 19, 2005 1:10 AM
To: 'Tomcat Users List'
Subject: RE: Need help exporting contexts not under webapps/

Not clear what you want.

Send me the details

Where is your static document ( The directory )
How do want to access it ? ( the URL )  
Which version of TOMCAT YOU ARE USING 
Send me your server.xml 

Regards
Guru 

-Original Message-
From: J. Ryan Earl [mailto:[EMAIL PROTECTED] 
Sent: 18 April 2005 19:16
To: tomcat-user@jakarta.apache.org
Subject: Need help exporting contexts not under webapps/


Hello,

I'm in the process of bringing an in-house application up under Tomcat.
Previously we were using Jetty as the servlet container, but for various
reason I'm trying to get said application running with Tomcat 5.5.9 and Java
1.5.0.

The problem I'm having is that there are two directories with a large amount
of static files (pictures, videos, documents, and other forms of media) that
are mounted outside of the webapps/ home.  Under Jetty, there is a
configuration directive that I can use to export these directories under a
URL path.  I'm trying to do that in Tomcat, and the documentation has been
somewhat confusing.

What I've gathered is that this type of configuration should be put under
${CATALINA_HOME}/conf/context.xml however I have been able to do this
successfully.  I've tried putting the following in context.xml but it gives
me errors:

Context path=/DOCS docBase=/mnt/CMFiles/DOCS
 debug=0
/Context

So my question is, in short, given a directory structure of static files,
how do you get Tomcat to serve said static content off of an arbitrary URI?
Ideas?

Thanks in advance,
-ryan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Need help exporting contexts not under webapps/

2005-04-19 Thread Fritz Schneider
Guru,

I got it! Forget about aegean.xml! The key us server.xml! I was able to move
my ROOT directory by adding the following to my Host container in
server.xml:

 Context path= docBase=c:/www reloadable=true
  WatchedResourceWEB-INF/web.xml/WatchedResource 
 /Context

Then all of my subdirectories under c:\www showed up on the server,
including aegean. Other contexts continue to be recognized as deployed apps.

Fritz
-Original Message-
From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED]

Sent: Tuesday, April 19, 2005 5:45 AM
To: 'Tomcat Users List'
Subject: RE: Need help exporting contexts not under webapps/

Hello,

In your aegean.xml  try 

?xml version=1.0 encoding=UTF-8?
Context
path=/aegean docbase=c:\www\aegean
reloadable=true
  WatchedResourceWEB-INF/web.xml/WatchedResource

/Context

and then stop and start tocmat. 
Go to the manager application and see if you can see the application
started ? 
if not try to start it. If yes then try the link
http://www.peacham.com/aegean
If it does not look into the logs 


Regards
Guru 

-Original Message-
From: Fritz Schneider [mailto:[EMAIL PROTECTED] 
Sent: 19 April 2005 13:25
To: 'Tomcat Users List'
Subject: RE: Need help exporting contexts not under webapps/


Guru,

Earl isn't the only one trying to do this. Here are the details for my
attempts which may or may not be similar to his:

 - Running TC 5.5.8, JVM 1.5.0_02-b09 under Win XP Pro SP2
 - I have a set of static pages (starting with index.htm) stored at
C:\www\aegean
 - C:\www\agean\WEB-INF\web.xml contains web-app/
 - I wish to access them as http://www.peacham.com/aegean
 - aegean is just one of many such directories.
 - It works if I copy it to {TOMCAT_BASE}\webapps\aegean but that creates
maintenance headaches by coupling the TC directory structure to the web site
directory structure.
 - I have tried building a webapps/aegean directory with just WEB-INF and
adding aegean.xml to {TOMCAT-BASE}\conf\Catalina\localhost containing:

?xml version=1.0 encoding=UTF-8?
Context
path=/aegean docbase=c:/www/aegean
reloadable=true
  WatchedResourceWEB-INF/web.xml/WatchedResource
/Context

but all I get is 404 errors and no hint of other errors in the logs. I have
tried a couple of variations with equally poor results.

Thanks for any help you can give

Fritz

-Original Message-
From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED]

Sent: Tuesday, April 19, 2005 1:10 AM
To: 'Tomcat Users List'
Subject: RE: Need help exporting contexts not under webapps/

Not clear what you want.

Send me the details

Where is your static document ( The directory )
How do want to access it ? ( the URL )  
Which version of TOMCAT YOU ARE USING 
Send me your server.xml 

Regards
Guru 

-Original Message-
From: J. Ryan Earl [mailto:[EMAIL PROTECTED] 
Sent: 18 April 2005 19:16
To: tomcat-user@jakarta.apache.org
Subject: Need help exporting contexts not under webapps/


Hello,

I'm in the process of bringing an in-house application up under Tomcat.
Previously we were using Jetty as the servlet container, but for various
reason I'm trying to get said application running with Tomcat 5.5.9 and Java
1.5.0.

The problem I'm having is that there are two directories with a large amount
of static files (pictures, videos, documents, and other forms of media) that
are mounted outside of the webapps/ home.  Under Jetty, there is a
configuration directive that I can use to export these directories under a
URL path.  I'm trying to do that in Tomcat, and the documentation has been
somewhat confusing.

What I've gathered is that this type of configuration should be put under
${CATALINA_HOME}/conf/context.xml however I have been able to do this
successfully.  I've tried putting the following in context.xml but it gives
me errors:

Context path=/DOCS docBase=/mnt/CMFiles/DOCS
 debug=0
/Context

So my question is, in short, given a directory structure of static files,
how do you get Tomcat to serve said static content off of an arbitrary URI?
Ideas?

Thanks in advance,
-ryan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Need help exporting contexts not under webapps/

2005-04-19 Thread J. Ryan Earl
Thanks for the reply, I actually figured it a few hours later.  I was trying
to do 2/ in your list.  I added a PICS.xml and a DOCS.xml under the
${CATALINA_HOME}/conf/Catalina/localhost/ directory which gave me the PICS
and DOCS contexts.  ie:

[EMAIL PROTECTED] localhost]$ pwd
/home/tomcat/jakarta-tomcat-5.5.9/conf/Catalina/localhost
[EMAIL PROTECTED] localhost]$ ls
DOCS.xml  host-manager.xml  manager.xml  PICS.xml
[EMAIL PROTECTED] localhost]$ cat PICS.xml
Context docBase=/mnt/CMFiles/PICS
 privileged=true antiResourceLocking=false
antiJARLocking=false
/Context
[EMAIL PROTECTED] localhost]$ cat PICS.xml
Context docBase=/mnt/CMFiles/PICS
 privileged=true antiResourceLocking=false
antiJARLocking=false
/Context
[EMAIL PROTECTED] localhost]$ cat PICS.xml DOCS.xml
Context docBase=/mnt/CMFiles/PICS
 privileged=true antiResourceLocking=false
antiJARLocking=false
/Context
Context docBase=/mnt/CMFiles/DOCS
 privileged=true antiResourceLocking=false
antiJARLocking=false
/Context



-Original Message-
From: QM [mailto:[EMAIL PROTECTED]
Sent: Monday, April 18, 2005 8:30 PM
To: Tomcat Users List
Subject: Re: Need help exporting contexts not under webapps/


On Mon, Apr 18, 2005 at 01:16:04PM -0500, J. Ryan Earl wrote:
: So my question is, in short, given a directory structure of static files,
: how do you get Tomcat to serve said static content off of an arbitrary
URI?

So, are you trying to
1/ have a Tomcat-run webapp serve content that exists outside of the
context path?

2/ setup the static content as its own webapp (context)?


For #1, the (portable, spec-friendly) way is to write a servlet or
filter to intercept requests for a given URI, open the matching file as
an InputStream, and push the data to the client via the Response
OutputStream.

For #2, I don't remember the exact syntax off the top of my head so I
won't waste your time with something that may not work. =) But it's
definitely possible for a webapp to not exist under the webapps/
directory.

Just make sure said webapp has a WEB-INF directory and a web.xml.  Even
a web.xml of just
web-app/
should do.

-QM

--

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need help exporting contexts not under webapps/

2005-04-19 Thread Gurumoorthy
Did you manage to get it right ?
I would recommend that you use lower case context path name

Regards
Guru
- Original Message -
From: J. Ryan Earl [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Tuesday, April 19, 2005 6:56 PM
Subject: RE: Need help exporting contexts not under webapps/


 Thanks for the reply, I actually figured it a few hours later.  I was
trying
 to do 2/ in your list.  I added a PICS.xml and a DOCS.xml under the
 ${CATALINA_HOME}/conf/Catalina/localhost/ directory which gave me the PICS
 and DOCS contexts.  ie:

 [EMAIL PROTECTED] localhost]$ pwd
 /home/tomcat/jakarta-tomcat-5.5.9/conf/Catalina/localhost
 [EMAIL PROTECTED] localhost]$ ls
 DOCS.xml  host-manager.xml  manager.xml  PICS.xml
 [EMAIL PROTECTED] localhost]$ cat PICS.xml
 Context docBase=/mnt/CMFiles/PICS
  privileged=true antiResourceLocking=false
 antiJARLocking=false
 /Context
 [EMAIL PROTECTED] localhost]$ cat PICS.xml
 Context docBase=/mnt/CMFiles/PICS
  privileged=true antiResourceLocking=false
 antiJARLocking=false
 /Context
 [EMAIL PROTECTED] localhost]$ cat PICS.xml DOCS.xml
 Context docBase=/mnt/CMFiles/PICS
  privileged=true antiResourceLocking=false
 antiJARLocking=false
 /Context
 Context docBase=/mnt/CMFiles/DOCS
  privileged=true antiResourceLocking=false
 antiJARLocking=false
 /Context



 -Original Message-
 From: QM [mailto:[EMAIL PROTECTED]
 Sent: Monday, April 18, 2005 8:30 PM
 To: Tomcat Users List
 Subject: Re: Need help exporting contexts not under webapps/


 On Mon, Apr 18, 2005 at 01:16:04PM -0500, J. Ryan Earl wrote:
 : So my question is, in short, given a directory structure of static
files,
 : how do you get Tomcat to serve said static content off of an arbitrary
 URI?

 So, are you trying to
 1/ have a Tomcat-run webapp serve content that exists outside of the
 context path?

 2/ setup the static content as its own webapp (context)?


 For #1, the (portable, spec-friendly) way is to write a servlet or
 filter to intercept requests for a given URI, open the matching file as
 an InputStream, and push the data to the client via the Response
 OutputStream.

 For #2, I don't remember the exact syntax off the top of my head so I
 won't waste your time with something that may not work. =) But it's
 definitely possible for a webapp to not exist under the webapps/
 directory.

 Just make sure said webapp has a WEB-INF directory and a web.xml.  Even
 a web.xml of just
 web-app/
 should do.

 -QM

 --

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

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Need help exporting contexts not under webapps/

2005-04-19 Thread J. Ryan Earl
Yea, I accidently hit the send button on the last email before I was done
writing it, but it's working.  I just had to create two context files under
conf/Catalina/localhost/

-ryan

-Original Message-
From: Gurumoorthy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 19, 2005 1:33 PM
To: Tomcat Users List
Subject: Re: Need help exporting contexts not under webapps/


Did you manage to get it right ?
I would recommend that you use lower case context path name

Regards
Guru
- Original Message -
From: J. Ryan Earl [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Tuesday, April 19, 2005 6:56 PM
Subject: RE: Need help exporting contexts not under webapps/


 Thanks for the reply, I actually figured it a few hours later.  I was
trying
 to do 2/ in your list.  I added a PICS.xml and a DOCS.xml under the
 ${CATALINA_HOME}/conf/Catalina/localhost/ directory which gave me the PICS
 and DOCS contexts.  ie:

 [EMAIL PROTECTED] localhost]$ pwd
 /home/tomcat/jakarta-tomcat-5.5.9/conf/Catalina/localhost
 [EMAIL PROTECTED] localhost]$ ls
 DOCS.xml  host-manager.xml  manager.xml  PICS.xml
 [EMAIL PROTECTED] localhost]$ cat PICS.xml
 Context docBase=/mnt/CMFiles/PICS
  privileged=true antiResourceLocking=false
 antiJARLocking=false
 /Context
 [EMAIL PROTECTED] localhost]$ cat PICS.xml
 Context docBase=/mnt/CMFiles/PICS
  privileged=true antiResourceLocking=false
 antiJARLocking=false
 /Context
 [EMAIL PROTECTED] localhost]$ cat PICS.xml DOCS.xml
 Context docBase=/mnt/CMFiles/PICS
  privileged=true antiResourceLocking=false
 antiJARLocking=false
 /Context
 Context docBase=/mnt/CMFiles/DOCS
  privileged=true antiResourceLocking=false
 antiJARLocking=false
 /Context



 -Original Message-
 From: QM [mailto:[EMAIL PROTECTED]
 Sent: Monday, April 18, 2005 8:30 PM
 To: Tomcat Users List
 Subject: Re: Need help exporting contexts not under webapps/


 On Mon, Apr 18, 2005 at 01:16:04PM -0500, J. Ryan Earl wrote:
 : So my question is, in short, given a directory structure of static
files,
 : how do you get Tomcat to serve said static content off of an arbitrary
 URI?

 So, are you trying to
 1/ have a Tomcat-run webapp serve content that exists outside of the
 context path?

 2/ setup the static content as its own webapp (context)?


 For #1, the (portable, spec-friendly) way is to write a servlet or
 filter to intercept requests for a given URI, open the matching file as
 an InputStream, and push the data to the client via the Response
 OutputStream.

 For #2, I don't remember the exact syntax off the top of my head so I
 won't waste your time with something that may not work. =) But it's
 definitely possible for a webapp to not exist under the webapps/
 directory.

 Just make sure said webapp has a WEB-INF directory and a web.xml.  Even
 a web.xml of just
 web-app/
 should do.

 -QM

 --

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

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Need help exporting contexts not under webapps/

2005-04-18 Thread J. Ryan Earl
Hello,

I'm in the process of bringing an in-house application up under Tomcat.
Previously we were using Jetty as the servlet container, but for various
reason I'm trying to get said application running with Tomcat 5.5.9 and Java
1.5.0.

The problem I'm having is that there are two directories with a large amount
of static files (pictures, videos, documents, and other forms of media) that
are mounted outside of the webapps/ home.  Under Jetty, there is a
configuration directive that I can use to export these directories under a
URL path.  I'm trying to do that in Tomcat, and the documentation has been
somewhat confusing.

What I've gathered is that this type of configuration should be put under
${CATALINA_HOME}/conf/context.xml however I have been able to do this
successfully.  I've tried putting the following in context.xml but it gives
me errors:

Context path=/DOCS docBase=/mnt/CMFiles/DOCS
 debug=0
/Context

So my question is, in short, given a directory structure of static files,
how do you get Tomcat to serve said static content off of an arbitrary URI?
Ideas?

Thanks in advance,
-ryan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need help exporting contexts not under webapps/

2005-04-18 Thread QM
On Mon, Apr 18, 2005 at 01:16:04PM -0500, J. Ryan Earl wrote:
: So my question is, in short, given a directory structure of static files,
: how do you get Tomcat to serve said static content off of an arbitrary URI?

So, are you trying to
1/ have a Tomcat-run webapp serve content that exists outside of the
context path?

2/ setup the static content as its own webapp (context)?


For #1, the (portable, spec-friendly) way is to write a servlet or
filter to intercept requests for a given URI, open the matching file as
an InputStream, and push the data to the client via the Response
OutputStream.

For #2, I don't remember the exact syntax off the top of my head so I
won't waste your time with something that may not work. =) But it's
definitely possible for a webapp to not exist under the webapps/
directory.

Just make sure said webapp has a WEB-INF directory and a web.xml.  Even
a web.xml of just
web-app/
should do.

-QM

-- 

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]