Hello ,
I am trying to make a applet to servlet communication. The applet makes a
connection but servlet produces the following exception.
My code is
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
ObjectOutputStream out = null;
Connection con = null;
System.out.println("Started the DataSetServlet..."+request);
try {
/ Retrieve the service request
System.out.println("getting the stream");
InputStream ins = request.getInputStream();
System.out.println("Creating the stream "+ins);
//getting exception at this line
ObjectInputStream in = new ObjectInputStream(ins);
System.out.println("Reading the object");
String sSQL = (String) in.readObject();
in.close(); in = null;
Creating the stream SaApi.servlet.SaServletInputStream@8b3a61cb
Exception: Caught EOFException while reading the stream header
java.io.StreamCorruptedException: Caught EOFException while reading the
stream h
eader
at
java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:727
)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:165)
at SaServletEngine.DataSetServlet.doPost(Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at
SaApi.servlet.SaServletUtils.serviceRequest(SaServletUtils.java:532)
at
SaApi.servlet.SaServletUtils.processServletRequest(SaServletUtils.jav
a:633)
at
SaApi.servlet.SaServletInvokerApp.SaProcessInputStream(SaServletInvok
erApp.java:159)
at
SaApi.servlet.SaServletInvokerApp.handleClient(SaServletInvokerApp.ja
va:226)
at SaApi.SaApp.processRequest(Compiled Code)
at SaApi.SaSamUbsContext.processActivator(SaSamUbsContext.java:1046)
at SaApi.SaSamUbsContext.processRequest(SaSamUbsContext.java:1383)
at SaApi.SaSamUbsContext.execute(SaSamUbsContext.java:1487)
at SaApi.SaThreadPool$Worker.run(Compiled Code)
at java.lang.Thread.run(Thread.java:479)
Closed the object stream ...
Any help is really appreceated.
Thanks,
Kavitha.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html