Hi there...
I see your post on TomCat User List
 
>....If you mean simulate a POST HTTP operation, that's significantly
more >complicated so I won't go into it unless that's what you really want.
 
>Yoav Shapira
And i need help on this....
 
I'm trying to do a post  from a servlet to another servlet but, does not
work I ....
 
The servlet that make de POST have this code
       
     {
            String event;
            event = request.getParameter("event-source");
            URL url = new URL( "http", "localhost", 8888, "/servletDEST");
            URLConnection connection = url.openConnection();
            ((HttpURLConnection)connection).setRequestMethod( "POST");
            connection.setDoInput( true);
            connection.setDoOutput( true);
            OutputStreamWriter out = new
OutputStreamWriter(connection.getOutputStream());
            out.write( "event-source="+evento+"&event-name="+comando);
            out.write( "\r\n");
            out.flush();
            out.close();
            
      }
But this don't work. He do not make de post into the servlet "/servletDEST"
If I make a post from a FORM in a browser no problem... but if I use this
code, just don't work... and I need to make a Post from a servlet..
 
Thks.
 
./narciso
 

Reply via email to