Hi ..
I would like to call a servlet from an applet .
My Applet will prompt for a username and password (lets say) and when I click submit button , I need to transfer the control to the servlet .
How can I do that ? I need servlet output has to be displayed on teh same screen .
Any one knows about this please help me .
My Applet code is like this ...
public void submit() {
String location = "../servlet/SnoopServlet1";
try {
URL url = new URL(location);
URLConnection con = url.openConnection();
}catch (MalformedURLException mue){
System.err.println(mue.getMessage());
}catch (IOException e) {
System.err.println(e.getMessage());
}catch(Exception e) {
System.out.println("Cannot open connection);
}
But this is not working for me .
Thanks and Regards
I would like to call a servlet from an applet .
My Applet will prompt for a username and password (lets say) and when I click submit button , I need to transfer the control to the servlet .
How can I do that ? I need servlet output has to be displayed on teh same screen .
Any one knows about this please help me .
My Applet code is like this ...
public void submit() {
String location = "../servlet/SnoopServlet1";
try {
URL url = new URL(location);
URLConnection con = url.openConnection();
}catch (MalformedURLException mue){
System.err.println(mue.getMessage());
}catch (IOException e) {
System.err.println(e.getMessage());
}catch(Exception e) {
System.out.println("Cannot open connection);
}
But this is not working for me .
Thanks and Regards