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:
<filter>
<filter-name>ssi</filter-name>
<filter-class>
org.apache.catalina.ssi.SSIFilter
</filter-class>
<init-param>
<param-name>contentType</param-name>
<param-value>text/x-server-parsed-html(;.*)?</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>expires</param-name>
<param-value>666</param-value>
</init-param>
<init-param>
<param-name>isVirtualWebappRelative</param-name>
<param-value>0</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ssi</filter-name>
<url-pattern>*.html</url-pattern>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
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
(http://marc.info/?l=tomcat-user&m=122773577323607&w=2), and here is a
snippet:
> 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:
<init-param>
<param-name>contentType</param-name>
<param-value>text/x-server-parsed-jsp(;.*)?</param-value>
</init-param>
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?
Thanks.
--
View this message in context:
http://www.nabble.com/Issue-With-SSI-And-JSP-tp25707397p25721753.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]