tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonard Bedner <>
Subject Re: Issue With SSI And JSP
Date Fri, 02 Oct 2009 20:05:08 GMT

Mark Thomas wrote:
> Leonard Bedner wrote:
>> When jsp is taken out of <url-pattern>. it returns the time, and the
>> context
>> path perfectly. When I add it back though, I just get whitespace.
>> Any ideas?
> JSP processing is also done by a servlet. You can't have the same
> resource served by two servlets. Try switching to using the SSI filter.
> Mark

Thanks for your help so far, Mark. I did what you suggested, and moved to
using the SSI Filter. Here is my configuration for it from web.xml:


Now, on my html pages, the ssi works, just as it has before. However, on my
jsp pages, it is no longer working, though the code *is* being processed
corrrectly. Before coming back, I decided to google this issue, and
interestingly enough, I found a thread where *you* were helping someone with
a similiar issue last year. Here is the thread
(, and here is a

> I am pretty sure the content types have to match in order for the filter
> to
> be used. The content type of your JSP doesn't match your filter
> configuration.
> >         <init-param>
> >           <param-name>contentType</param-name>
> >           <param-value>text/x-server-parsed-html(;.*)?</param-value>
> >         </init-param>
> Mark

So at the moment, I am in the same boat as this other user. After you
replied with this, he said everything was working well, though he didn't
show what he used. Forgive my ignorance, but I thought doing something like
the following would make this work for jsp:


Perhaps I am just not understanding how to use the content type, most likely
because I do not know anything about regular expressions. In short, how do I
set the content type for jsp?

View this message in context:
Sent from the Tomcat - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message