In my jsp i call a servlet in the following manner
document.writeln("<form name=\"ImportForm\" method=\"post\"
action=\"/servlet/ImportDataServlet?baseUrl="+window.location.href+"\"
ENCTYPE=\"multipart/form-data\" onSubmit=\"return doSubmit()\">");
The ImportDataServlet works fine as far as its functionality is
concerned but it does not print onto the browser any of the out.pritln()
statements.Instead the servlet goes into a loop and never exits.If i
comment the stream related code the out statements get printed.
I am using JRUN 3.0 with NES on NT 4.0
Following the code fragment of the servide method.
public void service(HttpServletRequest servReq,
HttpServletResponse servRes) throws IOException
{
out = servRes.getOutputStream();
servRes.setContentType("text/html");
try
{
int length = servReq.getContentLength();
InputStream is = servReq.getInputStream();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
int c, i=0;
while(i < length && (c = is.read()) >= 0) {
bos.write(c);
}
is.close();
reqString = new String(bos.toByteArray());
bos.close();
/*if i comment out the above logic completely the below statements get
shown on the browser*/
out.println("<html>");
out.println("<head>");
out.println("</head>");
out.println("<body>");
out.println("hello");
out.println("</body>");
out.println("</html>");
out.close();
}
Catch(Exception e) { }
Any pointers towards this highly appreciated....
Aravind
--
################################################################
Aravind Kumar L.N.S
Systems Engineer,
Wipro Technologies,
Corporate Domain, Account : Deploy,
Survey No. 64, SerilingamPalli Mandal
Madhapur, Hyderabad - 500033,
Phone : +91 40 6565211 (O)
Fax : +91 40 3110043 (O)
Email : [EMAIL PROTECTED]
www.wipro.com
The World's First SEI CMM Level 5 Software Services Company
################################################################
===========================================================================
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