• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet calling Servlet

 
S Raman
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having applet which calls a LogoutServlet
The logout servlet closes makes entry in database regarding client logout(it does this) and should redirect to login.jsp

how can this be achieved.
or atleast can i close the window in which the applet is present

urgent

thanks
Sridhar Raman
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can i close the window in which the applet is present


Probably not

The applet is acting as the client for the request to the Servlet. It receives the return response. It is up to the applet to make meaning of this response.

When the client that sent the request to the Servlet is a browser, it handles the response and renders the page.

You can forward to a jsp from the servlet but that does not change the fact that the applet is getting the response not the browser.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by S Raman:
urgent

Please read this.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since, what you're trying to do involves applet/browser interaction, I think this question would do better in our Applets forum.
Moving
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael Ku has a point. If you want the applet to make the redirect send post to servlet, respond to applet and do a redirect from applet with the code you got from the servlet

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic