tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thom Park <>
Subject DTD DOCTYPE wrong in examples....?
Date Tue, 21 Aug 2001 21:00:34 GMT

Sun appear to have changed the DOCTYPE for the web application in servlet
specification 2.3.
Actually, in the draft spec it states that the doc type is:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "">

however, the actual location appears to be:

Can anyone shed some light on what it should be? Practically speaking,
the only way to get this file to work (if you're using a DTD parser) is to
specify the latter URL, however the Spec still insists that the former
should be

Which should it be?


-----Original Message-----
From: Jonathan Eric Miller []
Sent: Tuesday, August 21, 2001 8:47 AM
To: Tomcat Developer List
Subject: Fw: Bug in ServletResponse.flushBuffer() in Tomcat 4.0b7?

I originally posted this to the tomcat-user list, but, I received no
response. As far as I can tell, it's a bug, so, I'm now forwarding this to
the developer list in hopes that someone here might be able to confirm
whether this is a bug or not.

If you know the answer and respond, please respond to me directly or post to
the user list as I am not on this list.

Thanks a lot. I think you guys are doing a great job. It's just a few small
issues like this that I hope to resolve at this point.


----- Original Message -----
From: "Jonathan Eric Miller" <>
To: "Tomcat User List" <>
Sent: Thursday, August 16, 2001 2:14 PM
Subject: Bug in ServletResponse.flushBuffer() in Tomcat 4.0b7?

> I'm having problems using ServletResponse.flushBuffer() and Tomcat 4.0b7.
> The following servlet demonstrates.
> What I want it to do is print out the title and the "Test 1" line. Then,
> pause for 10 seconds and print out the "Test 2" line. It doesn't work the
> first time through. However, if I then hit Refresh in my browser after
> through it once, you can see clearly that it prints out the first line
> pauses and prints out the last line as I would expect it to. Is this a
> Can someone else reproduce this?
> The reason I want to get this to work is that I have a servlet where I
> a page with a Submit button on it, then on the next page, there is
> a few second lag while performing an update on a directory/database. I've
> had problems in the past where users click the Submit multiple times
> they think it's stuck. Actually, it's not, it's just slow. So, what I want
> to do is print out at least the top part of the page so that the Submit
> button/previous page is no longer available for them to click on. If
> could fix this for the final version of Tomcat 4, I would greatly
> it. Either that or, if anyone else knows of a work around, that would be
> appreciated too.
> Thanks, Jon
> import*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> public class SimpleServlet extends HttpServlet
> {
>  public void doGet(HttpServletRequest req, HttpServletResponse resp)
> IOException
>  {
>   try
>   {
>    resp.setContentType("text/html");
>    PrintWriter pw = resp.getWriter();
>    pw.println("<html><head><title>SimpleServlet</title></head><body>");
>    pw.println("<p>Test 1</p>");
>    pw.flush();
>    resp.flushBuffer();
>    Thread.sleep(10000);
>    pw.println("<p>Test 2</p>");
>    pw.println("</body></html>");
>    pw.close();
>   }
>   catch(Exception e)
>   {
>    System.out.println(e);
>   }
>  }
> }

View raw message