I added this:

 

<%!

public static void noCache (HttpServletResponse response)

{

long TheDeltaFromNowUntilPageMustBeRefreshed=10; //Amount of time from
now

long expiry = now() + TheDeltaFromNowUntilPageMustBeRefreshed;

response.setDateHeader("Expires", expiry);

response.setHeader("Cache-Control", "max-age=3600"); //force the cache

}

%>

 

and then called it in the JSP and it gave an error message and then
displayed the page after 10-15 seconds which is the time it usually took
to load.

 

Any ideas?

 

Thanks again!

 

~ Troy Campano ~

 

-----Original Message----- 
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Thu 9/18/2003 5:20 PM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: Re: Problems with JSP pages not loading

Troy: 
try this- 

public static void noCache (HttpServletResponse response) 
  { 
   long TheDeltaFromNowUntilPageMustBeRefreshed= //Amount of time from
now 
until you want the cache flushed 
   long expiry = now() + TheDeltaFromNowUntilPageMustBeRefreshed; 
    response.setDateHeader("Expires", expiry); 
    response.setHeader("Cache-Control", "max-age=3600"); //force the
cache 
to stay on for 60 * 60 
  } 
*call this when the JSP page is loaded* 

Hth, 
-Martin 

----- Original Message ----- 
From: "Campano, Troy" <[EMAIL PROTECTED]> 
To: <> 
Sent: Thursday, September 18, 2003 2:22 PM 
Subject: Re: Problems with JSP pages not loading 

 

No, 
I don't have anything like that in there. 

I can remove all html/jsp code from the file and it still takes forever 
to load. It's almost like it has to recompile every time I request it. 

Thank you! 

-----Original Message----- 
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 18, 2003 2:13 PM 
To: [EMAIL PROTECTED] 
Subject: Re: Problems with JSP pages not loading 

do you have 
"pragma: no-cache". defined in your jsp or html? 

Here is a servlet to checkout jsp cache-settings 
http://www.servletsuite.com/servlets/cacheflt.htm 

-Martin 
----- Original Message ----- 
From: "Campano, Troy" <[EMAIL PROTECTED]> 
To: <[EMAIL PROTECTED]> 
Sent: Thursday, September 18, 2003 1:00 PM 
Subject: Problems with JSP pages not loading 

 

Hello, 
I was wondering if anyone else has run into this problem. 
I have a JSP/Java web application that uses frames. 

There are about 5 pages total in the frame. 
Once they load for the first time, they are compiled and run fast. 

My problem is that after my tomcat server has been running for a while 
the pages take forever to load (about 15 seconds). 
Then when I request them again, it's the same thing. 

The pages that take a while to load are basically all html..with a 
request.getParameter(") scriplet. 
When I remove all the JSP code, it still has the same problem. 

Any ideas? 

Thank you! 

~ Troy Campano ~ 

========================================================================

=== 
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff 
JSP-INTEREST". 
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST 
DIGEST". 

Some relevant archives, FAQs and Forums on JSPs can be found at: 

 http://java.sun.com/products/jsp 
 http://archives.java.sun.com/jsp-interest.html 
 http://forums.java.sun.com 
 http://www.jspinsider.com 

========================================================================

=== 
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff 
JSP-INTEREST". 
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST 
DIGEST". 

Some relevant archives, FAQs and Forums on JSPs can be found at: 

 http://java.sun.com/products/jsp 
 http://archives.java.sun.com/jsp-interest.html 
 http://forums.java.sun.com 
 http://www.jspinsider.com 

========================================================================
=== 
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff 
JSP-INTEREST". 
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST 
DIGEST". 

Some relevant archives, FAQs and Forums on JSPs can be found at: 

 http://java.sun.com/products/jsp 
 http://archives.java.sun.com/jsp-interest.html 
 http://forums.java.sun.com 
 http://www.jspinsider.com 

========================================================================
=== 
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST". 
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST". 

Some relevant archives, FAQs and Forums on JSPs can be found at: 

 http://java.sun.com/products/jsp 
 http://archives.java.sun.com/jsp-interest.html 
 http://forums.java.sun.com 
 http://www.jspinsider.com 


===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to