2009/2/3 chuckvb <ch...@atnr.com>: > > 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 <Content> 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