You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Thompson,Roger" <th...@oclc.org> on 2008/02/05 17:48:31 UTC

Trying to respond to s symbol both as a context (webapp) and as a request

Background: Tomcat 5.5.20
 
I am devolping a web service to provide vocabulary in a library setting.
The service will be located at:
http://tspilot.oclc.org/
 
One of the vocabularies is named "gsafd"
I need to respond differently to:
http://tspilot.oclc.org/gsafd
vs
http://tspilot.oclc.org/gsafd/
 
In the first case, I need to provide an XML document that gives a
description of the vocabulary.  I'm trying to do this from the ROOT
webapp.  In the second case, I am providing an SRU explain response.  I
have managed to accomplish the second case via URL rewrite rules in the
gsafd webapp's web.xml.  It appears that TOMCAT adds the trailing slash
to the URL if it is not present and so route the request through the
gsafd context.  How do I set up TOMCAT not to do this so the first form
is processed through the ROOT webapp.  There will be other vocabularies:
lcsh, lcshac, mesh, and fast as well as other that have to respond the
same way.
 
Ciao,
 
Roger
Thompson

Re: Trying to respond to s symbol both as a context (webapp) and as a request

Posted by Bill Barker <wb...@wilshire.com>.
The short answer is that you can't.

The longer answer is that if you have a Servlet mapped to /* in the gsafd 
app, then Tomcat will send the /gsafd request through unchanged (this 
"feature" is mostly to deal with broken WebDav clients).  This means that 
you can only use prefix matches in your web.xml, but it might be enough for 
you.

"Thompson,Roger" <th...@oclc.org> wrote in message 
news:1E41AE9AC12EA549BE5BC51A08DD8DC103795545@OAEXCH5SERVER.oa.oclc.org...
Background: Tomcat 5.5.20

I am devolping a web service to provide vocabulary in a library setting.
The service will be located at:
http://tspilot.oclc.org/

One of the vocabularies is named "gsafd"
I need to respond differently to:
http://tspilot.oclc.org/gsafd
vs
http://tspilot.oclc.org/gsafd/

In the first case, I need to provide an XML document that gives a
description of the vocabulary.  I'm trying to do this from the ROOT
webapp.  In the second case, I am providing an SRU explain response.  I
have managed to accomplish the second case via URL rewrite rules in the
gsafd webapp's web.xml.  It appears that TOMCAT adds the trailing slash
to the URL if it is not present and so route the request through the
gsafd context.  How do I set up TOMCAT not to do this so the first form
is processed through the ROOT webapp.  There will be other vocabularies:
lcsh, lcshac, mesh, and fast as well as other that have to respond the
same way.

Ciao,

Roger
Thompson




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