Hi,
I know the servlet can receive the parameters in the url by "?" and "&",
but for the following peace of codes, there is no "?" and "&" in the url,
how can the servlet receive/read the encoded code ? Does the server side
does not use servlet ?
// client side: send the encoded code to the server by http, not socket
// main purpose is for the communication through firewall !
sendCmdMsgToServer("This encoded string will be sent to server by http
connection");
void sendCmdMsgToServer(String s)
{
String baseUrl ="http://mymachine:8000/";
try
{
URL url = new URL(baseUrl, s);
URLConnection urlconnection = url.openConnection();
urlconnection.setUseCaches(false);
urlconnection.getInputStream().close();
return;
}
catch(Exception exception)
{
System.out.println("Error sending cmd message to server: " +
exception);
}
}
JackWang
___________________________________________________________________________
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