Problem when using Apache

X-Application Version: 3.1.3
Tamino Version : 3.1.2
Platform : Win2k
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

fter I have created an application with X-Application, it works just fine with Tomcat 3.3a (Alone). But after we integrated our Tomcat with Apache (while it is a so common and general approach to serve static contents), problems come. Here are the scenario to simulate the problem,

Scenario 1: In the search.jsp (created by x-application), type any words and press submit will bring you to the list.jsp, then press back button, ALL the typed in data in the search form disappeared.

Scenario 2: In the list.jsp, if it contains any result, click further into it to reach the vew.jsp page, then again, press back button, the following appears,

Warning: Page has Expired
The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.

To resubmit your information and view this Web page, click the Refresh button.


When investigating into the problem, I discovered that once the page contains xapp:xxx tag, the problem will appear. When I remove all those xapp tag (or just remove the taglib directive at the top), the problem go away. I have also tried to create simple form and simple tag, no such case! So, in my very own opinion, the cause is the xapp tag. Please correct me if I’m wrong. We will be very pleased if you can provide us a solution (please note that the above problem won’t exist in Tomcat-only environment).

Further information:
When I ran the sample application provided by Tomcat 3.3, and execute http://localhost/examples/jsp/num/numguess.jsp on IE

After typing the number on the textfield, and Submit the form. Then, click “Back” button on IE, I still could see the number on the textfield.

That means the configuration with Apache and Tomcat should be alright.

For the X-Application testing, I am using the sample application, Property, provided by X-Application. Of course, I have the same problems for other applications generated by X-Application too.

Thanks for any comments and ideas!

Mullin

nil

Hello,

I had a look into the source code of X-Application. There is one method responsible for the initialization of the HTTP response. It sets the header for the cache control.

    private void initResponse() {
        HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
        
        // set some HTTP headers, so that the pages expire pretty quickly
        response.addHeader("Cache-Control", "private");
        response.addHeader("Cache-Control", "no-store");
        response.addHeader("Cache-Control", "no-cache");
        response.addHeader("Pragma", "no-cache");
        response.setDateHeader("Expires", 0);
    }
</pre><BR><BR>If you don't like the current behavior of X-Application you could change the class 'JspTag.java' where you will find the method.<BR><BR>For the meaning of Cache-Control I found the following link:<BR><BR><A HREF="http://support.microsoft.com/default.aspx?scid=KB;en-us;q234067" TARGET=_blank>HOWTO: Prevent Caching in Internet Explorer</A><BR><BR>An alternative to the header information could be meta tags within the page:<BR><BR><pre class="ip-ubbcode-code-pre">
<HTML>
  <HEAD>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">
  </HEAD>
  <BODY>
    ...
  </BODY>
</HTML>



But I am not sure which has higher priority : the meta tags of the page or the header information of the response.

Is there an HTTP expert who can answer this question?

Bye,
Christian.