Originally posted by Ulf Dittmer:
But the applet can instruct the browser to replace the web page with a different one, via the getAppletContext().showDocument(String URL) call. That URL can include the two field values as GET parameters.
Originally posted by Ulf Dittmer:
And since that's not the one extending Applet, you'll need to pass a reference to the Sum class in the constructor.
try{
URL url = new URL("http://localhost:81/5/test.jsp" +s.getText()+e.getText());
}
catch(MalformedURLException e){
}
URL url = new URL("http://www.server.com/myApp/myServlet?param1=" +textfield1.getText()+"¶m2="+textfield2.getText());
what "param1" and "param2" represent?
do you mean I have to make a reference of the actionPerformed method in the main method of the Sum class?
Originally posted by Ulf Dittmer:
You can choose those freely - whatever makes sense for your server program. But the server app will need to know what they are so it can access them. The JSP page can't use "s.getText" (which you have above), instead it needs to access the request object and get those parameter. To do that, it needs to know their names.
give me a code example of this please...
Don't get me started about those stupid light bulbs. |