Its hard to determine why your page takes so long. Perhaps providing the
source may help.
A performance tip is to use a StringBuffer to append the html instead of
using the '+' operand.
instead of
out.println( "<html>" + "<body>" + "hello" + "</body>" + "</html>");
use
out.println( new StringBuffer("<html>").append("<body>"
).append("hello").append("</body>" ).append("</html>").toString());
Internally the JVM turns every '+' call into a two part StringBuffer which
can be expensive.
Good Luck
Ross
At 05:00 PM 3/31/99 +0200, you wrote:
>Hello,
>
>I wrote a servlet which is started as a 'startup servlet' (I proved,
>that it is initialized only once!). This servlet is invoked by a HTML
>POST command from a browser (HTML form). It generates a new HTML page
>using the 'PrintWriter'-class. My problem:
>
>IT LASTS 5 SECONDS FROM SUBMITTING THE FORM TO GETTING THE RESPONSE.
>(Although browser and server are running on the same PC)
>
>Is this an usual delay? How can I get a better performance?
>
>(I used the APACHE1.3.4 server , ApacheJServ1.0b1 and JSDK 2.0 with
>WindowsNT 4.0)
>
>Best regards
>
>Burkhard Schaefer
>
>
>____________________________________________________________
>
>Medigration GmbH Tel.: (++49) 09131-690-87-47
>Am Weichselgarten 7 Fax: (++49) 09131-690-8750
>D-91058 Erlangen www.medigration.de
>GERMANY
>
>
>------------------------------------------------------------
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>Problems?: [EMAIL PROTECTED]
>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]