wood burning stoves*
The moose likes Servlets and the fly likes how to call servlet and get back the response....? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to call servlet and get back the response....?" Watch "how to call servlet and get back the response....?" New topic
Author

how to call servlet and get back the response....?

Siddharth Ramavat
Ranch Hand

Joined: Feb 03, 2005
Posts: 41
hi, i am trying to call the servlet with URL object from the frame and passing two parameter the username and password with it....

The servlet has been called and the authentication has been made successfully. now i have put a boolean flag at servlet side, which sets true if the username and password is correct otherwise it sets to false....

After successfull execution of the servlet i want to pass the value of flag back to the frame.....

is it possible to do so....?

help me regarding the same.....

thank you
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

What do you mean "URL object from frame"?

Are you using client-side scripting to make HTTP requests?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Siddharth Ramavat
Ranch Hand

Joined: Feb 03, 2005
Posts: 41
First of Thanks for the reply,

Yes, i am doing the client-server chat application and my client side presentation is the stand-alone application made in JAVA SWING. So, I want to communicate with the servlet without opening the browser?

How can i do this..?

Thank You,
Siddharth Ramavat
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

There are quite a few threads this week that deal with calling servlets from custom clients. In them you'll find some good links to articles that show exactly how to do this.

http://www.coderanch.com/t/359716/Servlets/java/Firewall-Tunelling-Servlet-Technology
http://www.coderanch.com/t/359821/Servlets/java/Connection-between-standalone-application-Servlet
http://www.coderanch.com/t/359809/Servlets/java/commons-HttpClient-post-form-via
http://www.coderanch.com/t/359782/Servlets/java/applet-servlet
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to call servlet and get back the response....?
 
Similar Threads
XML Login
Servlet running continously and refreshing data!!
trying to do a loop
conditionally targetting the client frame based on Server(servlet) program
How to continously run a background servlet!!!