Server Side include won't work from root context
I am trying to get server side includes to work across app contexts in Tomcat 5.5.4 My ROOT webapp has the file includer/do_include.shtml The content is: html head link rel =stylesheet type=text/css href=style.css /head body table style=color: #ff9900 tr tdh2This page shows the use of the SSI/h2/td /tr /table table style=border:1px solid; tr td !--#include virtual=/test/index.jsp -- /td /tr /table /body /html The application context test is deployed. If you type http://localhost:8080/test/, the content of index.jsp shows. Finally, SSI functionality has been turned on in TOMCAT_HOME/conf/web.xml: servlet servlet-namessi/servlet-name servlet-class org.apache.catalina.ssi.SSIServlet /servlet-class init-param param-namebuffered/param-name param-value1/param-value /init-param init-param param-namedebug/param-name param-value5/param-value /init-param init-param param-nameexpires/param-name param-value666/param-value /init-param init-param param-nameisVirtualWebappRelative/param-name param-value0/param-value /init-param load-on-startup4/load-on-startup /servlet and servlet-mapping servlet-namessi/servlet-name url-pattern*.shtml/url-pattern /servlet-mapping When I go try to do the Server include using http://localhost/includer/do_include.shtml, I get [an error occurred while processing this directive] SEVERE: ssi: #include--Couldn't include file: /test/index.jsp java.io.IOException: Couldn't get context for path: /test/index.jsp at org.apache.catalina.ssi.SSIServletExternalResolver.getServletContextAndPathFromVirtualPath(SSIServletExternal Resolver.java:273) at org.apache.catalina.ssi.SSIServletExternalResolver.getServletContextAndPath(SSIServletExternalResolver.java:3 17) at org.apache.catalina.ssi.SSIServletExternalResolver.getFileText(SSIServletExternalResolver.java:366) at org.apache.catalina.ssi.SSIMediator.getFileText(SSIMediator.java:154) at org.apache.catalina.ssi.SSIInclude.process(SSIInclude.java:40) at org.apache.catalina.ssi.SSIProcessor.process(SSIProcessor.java:145) at org.apache.catalina.ssi.SSIServlet.processSSI(SSIServlet.java:193) at org.apache.catalina.ssi.SSIServlet.requestHandler(SSIServlet.java:170) at org.apache.catalina.ssi.SSIServlet.doGet(SSIServlet.java:106) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:731) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) The include does work for files within the ROOT context, though Any tips on what's still wrong would be appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Server side include
Doh! I missed that section. I uncommented it and it works now. Thanks, John On Thursday 26 September 2002 1:04 am, Robert L Sowders wrote: You are on the right track with naming the file .shtml. Since you have not told me what your configuration is, it is hard to give you a definitive answer. Are you using Tomcat as a stand-alone web server or are you using an Apache/Tomcat mix? Which versions of each would also help. Let's assume that you are using Tomcat 4.1.12 as a stand alone web server and have correctly renamed the jars and uncommented the correct section/s in conf/web.xml. If the container servlet is being loaded but the contents of .shtml files are being displayed instead of rendered then check in the conf/web.xml file and make sure the following is uncommented; !-- The mapping for the SSI servlet -- !-- servlet-mapping servlet-namessi/servlet-name url-pattern*.shtml/url-pattern /servlet-mapping -- If that's not it then I'm running out of answers. rls John Walstra [EMAIL PROTECTED] 09/25/2002 08:09 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Server side include I've already done that. And if I name my give my file an .shtml extension I just get the document source. The logs shows it's loading .. 2002-09-25 21:35:30 StandardWrapper[/jkw:ssi]: Loading container servlet ssi I've put ... !--#include file=cnet.html -- !--#config timefmt=%A %B %d, %Y -- !--#echo var=DATE_LOCAL -- and gotten nothing. On Wednesday 25 September 2002 9:27 pm, Robert L Sowders wrote: Look in the conf/web.xml file. Instructions are there on how to turn it on. rls John Walstra [EMAIL PROTECTED] 09/25/2002 07:07 PM Please respond to Tomcat Users List To: Tomcat Mailing List [EMAIL PROTECTED] cc: Subject:Server side include I'd like to user server side includes in my JSP. I've renamed servlets-ssi.renametojar to servlets-ssi.jar and uncommented the SSI area in my web.xml. I've placed ... !--#include virtual=jsp:getProperty name=company property=descUrl/ -- into my JSP, but it doesn't include the document. It however does place an HTML comment. !--#include virtual=cnet.html -- which is not really what I want. It doesn't look like it's processing my JSP. Do I have to have an .shtml extension? If so, can I change that? -- John Walstra [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Killing is wrong. -- Losira, That Which Survives, stardate unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Server side include
Well it works, sort of. It's not processing of my JSP tags in a SSI paqe. They just end up in the document. I turned on debugging to 5 in web.xml for SSI, but it hasn't printed any errors. Any clue? On Thursday 26 September 2002 1:27 am, John Walstra wrote: Doh! I missed that section. I uncommented it and it works now. Thanks, John On Thursday 26 September 2002 1:04 am, Robert L Sowders wrote: You are on the right track with naming the file .shtml. Since you have not told me what your configuration is, it is hard to give you a definitive answer. Are you using Tomcat as a stand-alone web server or are you using an Apache/Tomcat mix? Which versions of each would also help. Let's assume that you are using Tomcat 4.1.12 as a stand alone web server and have correctly renamed the jars and uncommented the correct section/s in conf/web.xml. If the container servlet is being loaded but the contents of .shtml files are being displayed instead of rendered then check in the conf/web.xml file and make sure the following is uncommented; !-- The mapping for the SSI servlet -- !-- servlet-mapping servlet-namessi/servlet-name url-pattern*.shtml/url-pattern /servlet-mapping -- If that's not it then I'm running out of answers. rls John Walstra [EMAIL PROTECTED] 09/25/2002 08:09 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Server side include I've already done that. And if I name my give my file an .shtml extension I just get the document source. The logs shows it's loading .. 2002-09-25 21:35:30 StandardWrapper[/jkw:ssi]: Loading container servlet ssi I've put ... !--#include file=cnet.html -- !--#config timefmt=%A %B %d, %Y -- !--#echo var=DATE_LOCAL -- and gotten nothing. On Wednesday 25 September 2002 9:27 pm, Robert L Sowders wrote: Look in the conf/web.xml file. Instructions are there on how to turn it on. rls John Walstra [EMAIL PROTECTED] 09/25/2002 07:07 PM Please respond to Tomcat Users List To: Tomcat Mailing List [EMAIL PROTECTED] cc: Subject:Server side include I'd like to user server side includes in my JSP. I've renamed servlets-ssi.renametojar to servlets-ssi.jar and uncommented the SSI area in my web.xml. I've placed ... !--#include virtual=jsp:getProperty name=company property=descUrl/ -- into my JSP, but it doesn't include the document. It however does place an HTML comment. !--#include virtual=cnet.html -- which is not really what I want. It doesn't look like it's processing my JSP. Do I have to have an .shtml extension? If so, can I change that? -- John Walstra [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] I want to read my new poem about pork brains and outer space ... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Server side include
Try this: jsp:include getProperty name='company' property=descUrl/ or something like it my syntax is surely off. John Walstra [EMAIL PROTECTED] 09/25/2002 11:56 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Server side include Well it works, sort of. It's not processing of my JSP tags in a SSI paqe. They just end up in the document. I turned on debugging to 5 in web.xml for SSI, but it hasn't printed any errors. Any clue? On Thursday 26 September 2002 1:27 am, John Walstra wrote: Doh! I missed that section. I uncommented it and it works now. Thanks, John On Thursday 26 September 2002 1:04 am, Robert L Sowders wrote: You are on the right track with naming the file .shtml. Since you have not told me what your configuration is, it is hard to give you a definitive answer. Are you using Tomcat as a stand-alone web server or are you using an Apache/Tomcat mix? Which versions of each would also help. Let's assume that you are using Tomcat 4.1.12 as a stand alone web server and have correctly renamed the jars and uncommented the correct section/s in conf/web.xml. If the container servlet is being loaded but the contents of .shtml files are being displayed instead of rendered then check in the conf/web.xml file and make sure the following is uncommented; !-- The mapping for the SSI servlet -- !-- servlet-mapping servlet-namessi/servlet-name url-pattern*.shtml/url-pattern /servlet-mapping -- If that's not it then I'm running out of answers. rls John Walstra [EMAIL PROTECTED] 09/25/2002 08:09 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Server side include I've already done that. And if I name my give my file an .shtml extension I just get the document source. The logs shows it's loading .. 2002-09-25 21:35:30 StandardWrapper[/jkw:ssi]: Loading container servlet ssi I've put ... !--#include file=cnet.html -- !--#config timefmt=%A %B %d, %Y -- !--#echo var=DATE_LOCAL -- and gotten nothing. On Wednesday 25 September 2002 9:27 pm, Robert L Sowders wrote: Look in the conf/web.xml file. Instructions are there on how to turn it on. rls John Walstra [EMAIL PROTECTED] 09/25/2002 07:07 PM Please respond to Tomcat Users List To: Tomcat Mailing List [EMAIL PROTECTED] cc: Subject:Server side include I'd like to user server side includes in my JSP. I've renamed servlets-ssi.renametojar to servlets-ssi.jar and uncommented the SSI area in my web.xml. I've placed ... !--#include virtual=jsp:getProperty name=company property=descUrl/ -- into my JSP, but it doesn't include the document. It however does place an HTML comment. !--#include virtual=cnet.html -- which is not really what I want. It doesn't look like it's processing my JSP. Do I have to have an .shtml extension? If so, can I change that? -- John Walstra [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] I want to read my new poem about pork brains and outer space ... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Server side include
I'd like to user server side includes in my JSP. I've renamed servlets-ssi.renametojar to servlets-ssi.jar and uncommented the SSI area in my web.xml. I've placed ... !--#include virtual=jsp:getProperty name=company property=descUrl/ -- into my JSP, but it doesn't include the document. It however does place an HTML comment. !--#include virtual=cnet.html -- which is not really what I want. It doesn't look like it's processing my JSP. Do I have to have an .shtml extension? If so, can I change that? -- John Walstra [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Progress might have been all right once, but it's gone on too long. -- Ogden Nash -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Server side include
Look in the conf/web.xml file. Instructions are there on how to turn it on. rls John Walstra [EMAIL PROTECTED] 09/25/2002 07:07 PM Please respond to Tomcat Users List To: Tomcat Mailing List [EMAIL PROTECTED] cc: Subject:Server side include I'd like to user server side includes in my JSP. I've renamed servlets-ssi.renametojar to servlets-ssi.jar and uncommented the SSI area in my web.xml. I've placed ... !--#include virtual=jsp:getProperty name=company property=descUrl/ -- into my JSP, but it doesn't include the document. It however does place an HTML comment. !--#include virtual=cnet.html -- which is not really what I want. It doesn't look like it's processing my JSP. Do I have to have an .shtml extension? If so, can I change that? -- John Walstra [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Progress might have been all right once, but it's gone on too long. -- Ogden Nash -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Server side include
I've already done that. And if I name my give my file an .shtml extension I just get the document source. The logs shows it's loading .. 2002-09-25 21:35:30 StandardWrapper[/jkw:ssi]: Loading container servlet ssi I've put ... !--#include file=cnet.html -- !--#config timefmt=%A %B %d, %Y -- !--#echo var=DATE_LOCAL -- and gotten nothing. On Wednesday 25 September 2002 9:27 pm, Robert L Sowders wrote: Look in the conf/web.xml file. Instructions are there on how to turn it on. rls John Walstra [EMAIL PROTECTED] 09/25/2002 07:07 PM Please respond to Tomcat Users List To: Tomcat Mailing List [EMAIL PROTECTED] cc: Subject:Server side include I'd like to user server side includes in my JSP. I've renamed servlets-ssi.renametojar to servlets-ssi.jar and uncommented the SSI area in my web.xml. I've placed ... !--#include virtual=jsp:getProperty name=company property=descUrl/ -- into my JSP, but it doesn't include the document. It however does place an HTML comment. !--#include virtual=cnet.html -- which is not really what I want. It doesn't look like it's processing my JSP. Do I have to have an .shtml extension? If so, can I change that? -- John Walstra 1002 North Stanford Street Port Washington, WI 53074 H: (262) 284-2395 C: (847) 858-2395 [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] A good memory does not equal pale ink. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Server side include
You are on the right track with naming the file .shtml. Since you have not told me what your configuration is, it is hard to give you a definitive answer. Are you using Tomcat as a stand-alone web server or are you using an Apache/Tomcat mix? Which versions of each would also help. Let's assume that you are using Tomcat 4.1.12 as a stand alone web server and have correctly renamed the jars and uncommented the correct section/s in conf/web.xml. If the container servlet is being loaded but the contents of .shtml files are being displayed instead of rendered then check in the conf/web.xml file and make sure the following is uncommented; !-- The mapping for the SSI servlet -- !-- servlet-mapping servlet-namessi/servlet-name url-pattern*.shtml/url-pattern /servlet-mapping -- If that's not it then I'm running out of answers. rls John Walstra [EMAIL PROTECTED] 09/25/2002 08:09 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Server side include I've already done that. And if I name my give my file an .shtml extension I just get the document source. The logs shows it's loading .. 2002-09-25 21:35:30 StandardWrapper[/jkw:ssi]: Loading container servlet ssi I've put ... !--#include file=cnet.html -- !--#config timefmt=%A %B %d, %Y -- !--#echo var=DATE_LOCAL -- and gotten nothing. On Wednesday 25 September 2002 9:27 pm, Robert L Sowders wrote: Look in the conf/web.xml file. Instructions are there on how to turn it on. rls John Walstra [EMAIL PROTECTED] 09/25/2002 07:07 PM Please respond to Tomcat Users List To: Tomcat Mailing List [EMAIL PROTECTED] cc: Subject:Server side include I'd like to user server side includes in my JSP. I've renamed servlets-ssi.renametojar to servlets-ssi.jar and uncommented the SSI area in my web.xml. I've placed ... !--#include virtual=jsp:getProperty name=company property=descUrl/ -- into my JSP, but it doesn't include the document. It however does place an HTML comment. !--#include virtual=cnet.html -- which is not really what I want. It doesn't look like it's processing my JSP. Do I have to have an .shtml extension? If so, can I change that? -- John Walstra 1002 North Stanford Street Port Washington, WI 53074 H: (262) 284-2395 C: (847) 858-2395 [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] A good memory does not equal pale ink. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
server side include
my query is really simple: does tomcat support server side include(SSI) in otherwise static pages.if it does, then what should be the filename extension of this file.should it be .shtml, as in Java webserver?(i don't think so).and where should i put such files?. [EMAIL PROTECTED] Buy Feng Shui Package for Rs. 151/- only, at http://shopping.rediff.com/shopping/fengshui_mailer.htm
Re: Server Side Include
On Sat, 28 Mar 1998, vinod wrote: hai How to make server-side Include in Tomcat.How to configure tomcat to run "shtml" file.Let me please know at the earliest vinod Support for server-side includes (*.shtml files) was added for Tomcat 4.0-beta-2, which was just released. The only missing functionality is the "exec" directive, which is being worked on. Craig McClanahan
Server Side Include
hai How to make server-side Include in Tomcat.How to configure tomcat to run "shtml" file.Let me please know at the earliest vinod
Re: Server Side Include in Tomcat
"Narayanan" [EMAIL PROTECTED] wrote: I tried to invoke a Server Side include in a shtml file. Iam using Tomcat 3.2.1 Filter with Apache. It is not giving any error but the servlet is not getting invoked. Iam unable to use Post method on a .shtml file. Tomcat doesn't support SSI, in any of the versions (3.2, 3.3 or 4.0). I have started to port Apache JSSI to Tomcat, and the only question is really where in the Jakarta project structure it should go. With some luck, I get a chance to get the ball rolling again this weekend. Until there's a JSSI port for Tomcat, you can run Tomcat behind Apache if you need support for NCSA style SSI directives (and let Apache handle them). For Servlet SSI, you can change all your servlet tags into jsp:include tags, i.e. making your pages JSP pages instead of .shtml/.jhtml pages. Hans -- Hans Bergsten [EMAIL PROTECTED] Gefion Software http://www.gefionsoftware.com Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com
Server Side Include in Tomcat
I tried to invoke a Server Side include in a shtml file. Iam using Tomcat 3.2.1 Filter with Apache. It is not giving any error but the servlet is not getting invoked. Iam unable to use Post method on a .shtml file. Thanks a lot in advance, Narayanan