tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Chamberlin <>
Subject Re: Question on SSI
Date Wed, 01 Sep 2010 22:52:09 GMT
  On 9/1/2010 1:49 PM, Christopher Schultz wrote:
> Hash: SHA1
> Marc,
> On 9/1/2010 4:13 PM, Marc Chamberlin wrote:
>>   Hello -  I am running a Tomcat6.0 server both stand-alone and with
>> Eclipse, and am in the process of developing a webapp that I will want
>> to make available to all our users via a server side include statement.
> Uhh... you want the webapp to be available via SSI? I'm pretty sure
> that's the problem of whoever wants to use your service. You can't
> configure SSI on someone else's site. Maybe I'm misunderstanding you.
Thanks Christopher for your taking the time to reply, again much 
appreciated! What I am trying to accomplish is to provide users with 
some services that can be included on their web pages, simply by 
including a server side include statement, which I will define for them, 
in their web pages. (I run a Tomcat server for a number of users and 
host their websites for them.)
>> I have this working in a limited sense, in that I got it working using
>> the filter version but was unsuccessful getting the servlet version
>> working, which is acceptable. (I am not clear on what the real
>> difference between the two approaches is, documentation is non-existent
>> as far as I could find).
> Do and
> count as
> non-existent? Or were you thinking of more involved documentation?
Yes, I read both of these documents, as well as a bunch of others! ;-)  
The documentation was not detailed enough for me to grok and solve this 
problem on my own....
>> Anywise, what I have working, works so long as the<!--#include
>> virtual="somefile.html" -->  is in a .shtml file, but this will be
>> unacceptable. I need this feature to also work from inside normal .html
>> and .htm as well as .jsp files as that is what our users will expect. I
>> have fooled around with the filter-mapping segment in the server's
>> web.xml file but so far no joy in finding a solution.
> You will have to use filter mapping in order to post-process your .jsp
> and other dynamic pages: a servlet can't be wrapped around another
> servlet (such as the JSPServlet, which you don't have to map yourself)
> for this kind of thing. So, stick with the filter.
OK, I kinda gathered that a filter is applied to everything served up by 
the server, before servlets are invoked... So it makes sense that a 
filter has to be used (if I am understanding this correctly) for JSP 
>> Searches (lots of em!) on the internet have not provided me with an
>> answer, though I have gotten hints that it is doable.  Could some kind
>> guru help me grok this and guide me to the light?  Many thanks in
>> advance....
> What is the complete configuration for your<filter>  and
> <filter-mapping>  for the aforementioned filter? It should be as simple
> as setting up multiple<url-pattern>s for the URL patterns that you want
> to have run through the SSI filter.
Umm, well let me include that part of the web.xml file, as it stands at 
the moment, here..  Note: Commented out pieces are from my attempts to 
get this working, so you can see some of the things that I have tried.....


<!-- ==================== Built In Filter Mappings 
====================== -->

<!-- The mapping for the SSI Filter -->



> Note that you should be able to set up SSI in a single webapp instead of
> modifying the conf/web.xml file as described in the SSI documentation. I
> find this cleaner, as you will only end up making SSI available in a
> specific webapp instead of across all webapps deployed onto the server.
> The<filter-mapping>  itself should definitely only be included in your
> webapp's META-INF/web.xml file.
Not sure I fully understand you here, so please forgive my lack of 
understanding... I do want this SSI feature to be available across all 
the webapps deployed on our server. As I mentioned previously, we want 
to provide some services that users can access, by simply including a 
server side include statement that will effectively include these 
features on their web pages.  And like I mentioned, I have gotten this 
working in one sense, but the include statement only works for me from 
within .shtml files and I need it to work from within .html, .htm, and 
.jsp files.


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

View raw message