Hi All,

I am working on an assignment where an applet has to communicate with a servlet.

It works fine with java data types, such as string etc, but when I try to use a class I have created, there is an exception thrown when it is cast into this class at the other end. The class i want to send does implement serializable, so I am not sure what is wrong.

Any ideas?


Class user implements serializable

protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {

            ObjectInputStream inputFromApplet = null;
            String theString;
            PrintWriter out = null;
            BufferedReader inTest = null;
            Users theUser = null;

                inputFromApplet = new ObjectInputStream(request.getInputStream());
                theUser = (Users) inputFromApplet.readObject();


        catch(Exception ex)

can you please paste the code? .....where you are exactly getting the error