Now I'm sure that the exception comes before the init method of the servlet. Also I 
have tried to connect to ser servlet using IExplorer and get an "This URL doesn't 
support GET method" but the servlet do the init method, so I'm thinking that there is 
problem with the way I connect to the servlet o that tomcat doesn't understand the 
connection.

Hola Enrique Cea. El 27/05/01 a la(s) 2:22 wrote:

>I think hat the exception occurs before init method of the servlet.
>
>The code of the java program that connect to the server is:
>
>---- Code of the client ------
>
>URL servlet = new
>URL("http://127.0.0.1:8080/prueba/anyadirMensajeServlet";);
>
>Mensaje msg = new MensajeReal();
>
>URLConnection con = servlet.openConnection();
>con.setDoInput(true);
>con.setDoOutput(true);
>con.setUseCaches(false);
>con.setRequestProperty("Content-Type",
>"application/x-www-form-urlencoded");
>ObjectOutputStream out = new ObjectOutputStream(con.getOutputStream());
>out.writeObject(msg);
>out.writeInt(1);
>
>out.flush();
>out.close();
,

Reply via email to