> From: EJ Ciramella [mailto:[EMAIL PROTECTED] 
> Subject: RE: Tomcat 4.1.30 + SSI + CruiseControl
> 
> <servlet-mapping>
>     <servlet-name>SSIServlet</servlet-name>
>     <url-pattern>/artifacts/specificpathtopagebuild/*</url-pattern>
> </servlet-mapping>
> 
> <servlet-mapping>
>     <servlet-name>ArtifactServlet</servlet-name>
>     <url-pattern>/artifacts/*</url-pattern>
> </servlet-mapping>
>
> Doesn't the first servlet-mapping take precedence?

Not necessarily.  Here are the rules from the 2.4 version of the spec:

"1. The container will try to find an exact match of the path of the
request to the
path of the servlet. A successful match selects the servlet.

"2. The container will recursively try to match the longest path-prefix.
This is done
by stepping down the path tree a directory at a time, using the '/'
character as
a path separator. The longest match determines the servlet selected.

"3. If the last segment in the URL path contains an extension (e.g.
.jsp), the servlet
container will try to match a servlet that handles requests for the
extension.
An extension is defined as the part of the last segment after the last
'.' character.

"4. If neither of the previous three rules result in a servlet match,
the container will
attempt to serve content appropriate for the resource requested. If a
"default"
servlet is defined for the application, it will be used.

"The container must use case-sensitive string comparisons for matching."

Since the mapping for SSIServlet is the longer prefix, it should have
been selected - but note the case-sensitivity requirement.

Also, there's this note in the 2.4 spec:

"Previous versions of this specification made use of these mapping
techniques
as a suggestion rather than a requirement, allowing servlet containers
to each have their different schemes for mapping client requests
to servlets."

Since 4.1.30 implements version 2.3, it's not clear how strictly the
above rules are followed.

> Also, the ssi jars aren't packaged up as part of my
> webapp, do they need to be?

Not sure about 4.1, but no in 5.5.  However, the SSI servlet is in
server/lib/servlets-ssi.renametojar - which should give you a hint about
what to do with it.  If you look at the commented-out section of
conf/web.xml for the SSI servlet, you'll also see several init-param
values that should be set.  5.5 also has an SSI filter, which might be
easier to use if it exists in 4.1.

Don't suppose you could move up to a more modern level of Tomcat?

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

Reply via email to