aspose file tools*
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
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: accessing servlet in a swing application