This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Servlets and the fly likes Applet calling Servlet - Servlet does not load Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Applet calling Servlet - Servlet does not load" Watch "Applet calling Servlet - Servlet does not load" New topic
Author

Applet calling Servlet - Servlet does not load

Dave Donohoe
Ranch Hand

Joined: May 16, 2000
Posts: 73
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

Joined: Mar 22, 2000
Posts: 12268
    
    1
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


Java Resources at www.wbrogden.com
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
actually its the doPost one no?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Applet calling Servlet - Servlet does not load
 
Similar Threads
servlet/applet communication problem
Send object from applet to servlet
Servlet could not send Objects to an Applet
To pass object from Applet to Servlet and vice versa
Passing objects between a servlet and an applet