File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes tomcat/apache + server side includes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "tomcat/apache + server side includes" Watch "tomcat/apache + server side includes" New topic
Author

tomcat/apache + server side includes

Shane Doucette
Greenhorn

Joined: Jun 26, 2002
Posts: 4
Hello!

I'm having a problem with server side includes within a tomcat context.

Specifically, I have an shtml file that needs to check the LAST_MODIFIED environment variable via the SSL echo command. It's in a tomcat context that is being served through apache/mod_jk. The command that I'm using is



This code works with SSI in sections of the server that are served by apache alone, and other variables behave as expected in the tomcat context.

For software, I'm running:

  • Apache httpd 2.0.54
  • Jakarta Tomcat 4.1.31
  • Java j2sdk 1.4.2_08
  • mod_jk from jakarta-tomcat-connectors-1.2.10



  • Has anyone else had a similar problem? If so, how did you resolve / work around the issue?

    Let me know if any further information is required, and I'll post / forward it on.

    Thanks!

    shane doucette.
    Ulf Dittmer
    Marshal

    Joined: Mar 22, 2005
    Posts: 42916
        
      68
    Well, what is the problem? You indicate that it works in Apache-only pages; does it not work in Apache/Tomcat pages? If not, what happens? Does Tomcat have SSI enabled (I think that by default it's turned off)?
    Shane Doucette
    Greenhorn

    Joined: Jun 26, 2002
    Posts: 4
    Hi!

    Originally posted by Ulf Dittmer:
    Well, what is the problem? You indicate that it works in Apache-only pages; does it not work in Apache/Tomcat pages? If not, what happens? Does Tomcat have SSI enabled (I think that by default it's turned off)?


    Tomcat does have SSI enabled, but shouldn't matter, I think. SSI is being handled by Apache, and my issue is present regardless of the enabled-ness os SSI in Tomcat.

    I'll exapnd a little, for clarity. When I use SSI in a Tomcat context, the SSI "echo var" command doesn't get the LAST_MODIFIED variable correctly. Specifically, if I use:




    I get:



    regardless of the date that the file was modified. (This appears to be the UNIX epoch?) In a non-context area, the last modified date is returned correctly. All other variables that are queried using "echo var" return sane and expected values.

    Here's my test page, in a context: test-echo-var.shtml (context)

    Here's the same test page, in a non-context that Tomcat / mod_jk don't manage: test-echo-var.shtml (non context)

    Also, I'm running on Mandriva Linux Corporate Server 3.0.

    Thanks for your reply, and I hope I've clarified my problem.

    shane doucette.

    ps - edited for additional OS information.
    pps - last edit ate part of my post. restored.
    [ January 03, 2006: Message edited by: Shane Doucette ]
     
     
    subject: tomcat/apache + server side includes