|
do a
response.setContentLength(int) before sending the html page. that will take care
of it.
cheers
Anamitra
My httpServlet makes a "connection reset by peer" error
while browser is trying to load an html page. This almost always happens but
it sometimes runs OK. Servlet makes too many jdbc operations and i think that
this may be the cause of that error. Here you got the pseudo-code of the
servlet:
/** * service method */ public void
service(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException { PrintWriter out; res.setContentType("text/html"); out =
res.getWriter();
...
parameter
parsing
.
.
DB access via JDBC
.
.
display results in html
(out.println('<results_in_html>') );
.
.
out.flush();
out.close(); }
many parts of code are
distributed on different java-objects
what can i do?
thanks for all.
Albert
Albert i
Leila
|