Does anyone have a sample of testing SerlvetConnection with Cactus
aka ...
URLConnection servletConnection =
servletURL.openConnection();
// to allow us to write to the URL ...
servletConnection.setDoOutput(true);
// to ensure that we do contact
// the servlet and don't get
// anything from the browser's cache
servletConnection.setUseCaches(false);
servletConnection.setDefaultUseCaches(false);
// Write the message to the servlet
PrintStream out = new PrintStream(servletConnection
.getOutputStream());
out.println(cmd);
out.println(subcmd);
out.println(s);
out.close();
// Now read in the response
StringBuffer buffer = new StringBuffer();
InputStream in = servletConnection.getInputStream();
int chr;
while ((chr = in.read()) != -1) {
buffer.append((char) chr);
}
in.close();
Could not see anything in the docs/samples
Thanks
--
regards
Martin West
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]