Why can't your JSP do the same? Put a scriptlet at the top that checks the
last modified date/time, and responds exactly as the servlet would. I'm
confused why this doesn't work for you.

Ted Neward
Java Instructor, DevelopMentor (http://www.develop.com)
http://www.javageeks.com/~tneward

-----Original Message-----
From: Stuart Maclean [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 31, 2000 3:09 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [advanced-servlets] JSP + Servlets and getLastModified()



In the HTTPServlet world, the servlet container gives my servlet the
chance build a response based around the '304 Not Modified' message,
via a long valued integer specifying a last modified time
(getLastModified()).  Great stuff, invaluable for servlets which
format some data once and then serve it forever.

Hmm, now I'm into JSP,  if I have a JSP page with static HTML and a
single <jsp:include> of a servlet, there seems no way for the JSP page
implementation class to handle this notion of lastModified().

Hmm, the HttpJspPage doesn't even extend HttpServlet so I guess this
functionality isn't planned?

I have perused the JSP 1.1 spec, nothing.

I'm tempted to wrap all my JSP pages inside servlets, using
requestDispatcher.includes()s, so I'll get the 304 options back...

Anyone any comments?

stu


--
Stuart Maclean, Research Associate
University of Washington
ITS Research Program, College of Engineering
Box 352500
Seattle, WA 98195-2500
Tel: (206) 543-0637
http://www.its.washington.edu



--------------------------------------------------------------------<e|-
The Most Expensive Thing You Can Haul Is An Empty Trailer.
http://click.egroups.com/1/5776/7/_/339362/_/965081336/
--------------------------------------------------------------------|e>-

To Post a message, send it to:   [EMAIL PROTECTED]

To Unsubscribe, send a blank message to:
[EMAIL PROTECTED]

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to