Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,157 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,127 people online right now. Registration is fast and FREE... Join Now!




connecting client program to the jsp server

 
Reply to this topicStart new topic

connecting client program to the jsp server

jowharshamshiri
28 Dec, 2007 - 03:04 AM
Post #1

New D.I.C Head
*

Joined: 24 Dec, 2007
Posts: 49


My Contributions
hi. i have this project that im doing and it requires me to use jsp which unfortunately im not familiar with. sad.gif
this is my question. i have the jsp file on the server. i supply it with values for variables and it does the processing and retrieves data from mysql database and return them to the browser. the problem is i dont want the data displayed in a browser. i want my clilent program to connect to the server in the background, use this jsp file and recieve the data in the form of a string or some thing? can you help me? i'm a little too lost! blink.gif
User is offlineProfile CardPM
+Quote Post

1lacca
RE: Connecting Client Program To The Jsp Server
28 Dec, 2007 - 05:19 AM
Post #2

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 11 times
My Contributions
Your client program should connect to the server via http and ask for the JSP (like a browser). This is pretty easy with the standard HttpURLConnection class.
User is offlineProfile CardPM
+Quote Post

jowharshamshiri
RE: Connecting Client Program To The Jsp Server
28 Dec, 2007 - 08:39 AM
Post #3

New D.I.C Head
*

Joined: 24 Dec, 2007
Posts: 49


My Contributions
yeah. thanks gotta look into that. but you didnt answer my question. lets say i do use this class. wouldnt it just give me a web page in return?
the one generated by the jsp file? i dont want that. i want a variable in th local clent program to be valued by the server jsp file or using what the jsp file generates. and i dont want to analize the whole returned html file to find the desired value. how about that?
User is offlineProfile CardPM
+Quote Post

1lacca
RE: Connecting Client Program To The Jsp Server
29 Dec, 2007 - 02:13 AM
Post #4

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 11 times
My Contributions
With a JSP file you can generate literally anything (since actually it is a servlet). It can return xml, plain text, etc. You can serialize objects into xml, so even returning beans is possible... I am not sure exactly what you want to do, so I can't tell the best solution.

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 11:23PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month