Re: tomcat including files from apache

2009-02-04 Thread Konstantin Kolinko
2009/2/3 chuckvb :
>
> I have a basic configuration working where Apache serves my static html and
> tomcat provides my dynamic data.  Using Apache2 on linux with TomCat 6 and
> mod_jk.
>
> How do I include header files and other files from apache for my
> tomcat jsp files.  right now I use <%@ include file="/header.html"%>
> but the header.html file must be in my tomcat directory.  I would like
> to pull that file from apache.  Tomcat will not accept <%@ include
> file="http://www.myapp.com/header.html"%>
> --

I know of the following ways:

1) write a ServletContextListener that pulls those files from Apache,

2) set allowLinking="true" on  element in
META-INF/context.xml and use symbolic links

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

3) provide your own implementation of javax.naming.directory.DirContext

http://tomcat.apache.org/tomcat-6.0-doc/config/resources.html

4) the c:import tag of JavaServer Pages™ Standard Tag Library 1.1 allows
specifying absolute URLs. I have not used that tag, though.

5) use SSIServlet.

http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat including files from apache

2009-02-04 Thread André Warnier

Hi again.
Apart from the standard mod_include in Apache 
(http://httpd.apache.org/docs/2.2/mod/mod_include.html) I was also 
thinking about another way.  It may look less efficient, but it isn't 
necessarily.


The trick would be to use s in the jsp pages which you generate.
An  has its own SRC attribute, meaning that you can put any 
absolute or relative URL in it you want.
The difference is that it will make a separate request to the server. 
But if what you want to include is always the same, it would be mostly 
cached by the browser, so it may be more efficient after all.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat including files from apache

2009-02-04 Thread André Warnier
I just want to forward the following, because I find it nice that 
someone who is not subscribed would nevertheless want to help.



 Original Message 
Subject: Re: tomcat including files from apache
Date: Wed, 4 Feb 2009 07:20:04 -0500
From: Rajwinder Makkar x
To: xxx
References: <21818196.p...@talk.nabble.com> 
<4988b2d8.4000...@reedyriver.com>	 <49894a26.1020...@ice-sa.com>


Sorry for replying u directly but i am new to this mailing list thing and
when i tried to reply to the thread it get bounced back but as i want to
give my opinion so sending u directly :

"I think we did the same some time back Where we included files residing in
apache in Tomcat jsp . My friend who did that put it on his blog here if it
helps :

http://mohitsuley.wordpress.com/2008/08/07/making-ssi-work-on-a-jsp-response/
"


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat including files from apache

2009-02-04 Thread André Warnier

H. Hall wrote:

chuckvb wrote:
I have a basic configuration working where Apache serves my static 
html and
tomcat provides my dynamic data.  Using Apache2 on linux with TomCat 6 
and

mod_jk.

How do I include header files and other files from apache for my 
tomcat jsp files.  right now I use <%@ include file="/header.html"%> 
but the header.html file must be in my tomcat directory.  I would like 
to pull that file from apache.  Tomcat will not accept <%@ include 
file="http://www.myapp.com/header.html"%>   

see: http://java.sun.com/products/jsp/tags/11/syntaxref1112.html

I believe this last response is irrelevant to the OP's problem. He's 
already doing that.
The part to be included resides on another server, or at least in 
another document space to which Tomcat does not have access.


The point is that the "include" shoud be done at the Apache level, after 
the Tomcat part has done its bit and sent the result back to Apache.
At the Apache level, some kind of output filter should then process the 
include and insert what's missing, from the Apache-side document space.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat including files from apache

2009-02-03 Thread H. Hall

chuckvb wrote:

I have a basic configuration working where Apache serves my static html and
tomcat provides my dynamic data.  Using Apache2 on linux with TomCat 6 and
mod_jk.

How do I include header files and other files from apache for my 
tomcat jsp files.  right now I use <%@ include file="/header.html"%> 
but the header.html file must be in my tomcat directory.  I would like 
to pull that file from apache.  Tomcat will not accept <%@ include 
file="http://www.myapp.com/header.html"%> 
  

see: http://java.sun.com/products/jsp/tags/11/syntaxref1112.html

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat including files from apache

2009-02-03 Thread André Warnier

chuckvb wrote:

I have a basic configuration working where Apache serves my static html and
tomcat provides my dynamic data.  Using Apache2 on linux with TomCat 6 and
mod_jk.

How do I include header files and other files from apache for my 
tomcat jsp files.  right now I use <%@ include file="/header.html"%> 
but the header.html file must be in my tomcat directory.  I would like 
to pull that file from apache.  Tomcat will not accept <%@ include 
file="http://www.myapp.com/header.html"%> 

Hi.
Just forget for a moment that the html is generated by Tomcat.
How would you do it if you wanted to have an "include" in a static html 
page served by Apache ?

Then just put that in your jsp pages.
No ?



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org