Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet calling Servlet - Servlet does not load

 
Dave Donohoe
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an Applet that calls a Servlet like so -
String tmp_szServletLocation = "http://localhost:8080/App/TheServlet";

URL tmp_urlServlet = new URL(tmp_szServletLocation);
URLConnection tmp_urlCon = tmp_urlServlet.openConnection();
tmp_urlCon.setUseCaches (false);
tmp_urlCon.setDefaultUseCaches(false);
ObjectInputStream inputFromServlet = new ObjectInputStream(tmp_urlCon.getInputStream());

I know it goes into the Servlet, as I have Debug Statments within the service method.
BUT, the onload() method in the Servlet never gets triggered.....
ANY ideas please?
[ January 23, 2002: Message edited by: Dave Donohoe ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With that URL, the doGet method in the servlet should be called. What is this onload() method and why do you expect it to be called?
Bill
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually its the doPost one no?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic