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!
connecting client program to the jsp server
Page 1 of 13 Replies - 1344 Views - Last Post: 29 December 2007 - 03:13 AM
#1
connecting client program to the jsp server
Posted 28 December 2007 - 04:04 AM
hi. i have this project that im doing and it requires me to use jsp which unfortunately im not familiar with. 
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!
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!
Replies To: connecting client program to the jsp server
#2
Re: connecting client program to the jsp server
Posted 28 December 2007 - 06:19 AM
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.
#3
Re: connecting client program to the jsp server
Posted 28 December 2007 - 09:39 AM
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?
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?
#4
Re: connecting client program to the jsp server
Posted 29 December 2007 - 03:13 AM
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.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|