This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes accessing servlet in a swing application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "accessing servlet in a swing application" Watch "accessing servlet in a swing application" New topic
Author

accessing servlet in a swing application

gayatri sabari
Greenhorn

Joined: Mar 14, 2006
Posts: 7
can any one suggest how to access a servlet through a swing application
ak pillai
author
Ranch Hand

Joined: Feb 11, 2006
Posts: 288
use URLConnection/HttpURLConnection class to connect. please find the sample code below. The key thing here is that, even if you do not get anything back from the servlet, you need to read from the input stream because of request/response paradigm.




java j2ee job interview questions with answers | Learn the core concepts and the key areas
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You might also want to look at http://jakarta.apache.org/commons/httpclient.
[ March 15, 2006: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
wood burning stoves
 
subject: accessing servlet in a swing application
 
Similar Threads
Context Share between 2 Web Apps
Accessing servlet in swing application
What is the best way to show a video in a swing Application
servlet validation?
Question on pausing a loop.