This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 41062
        
      43
    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)?


    Ping & DNS - my free Android networking tools app
    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 ]
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: tomcat/apache + server side includes
     
    Similar Threads
    Integration of apache and tomcat
    Can I use mod_jk + Tomcat and mod_jserv + JServ with the same Apache server?
    mod_jk // not clear on server.xml configs
    Build the mod_jk connector
    Apache Server don't recognized JSP code