3 Replies - 1580 Views - Last Post: 29 December 2007 - 03:13 AM Rate Topic: -----

#1 jowharshamshiri  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 65
  • Joined: 24-December 07

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! :blink:

Is This A Good Question/Topic? 0
  • +

Replies To: connecting client program to the jsp server

#2 1lacca  Icon User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

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.
Was This Post Helpful? 0
  • +
  • -

#3 jowharshamshiri  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 65
  • Joined: 24-December 07

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?
Was This Post Helpful? 0
  • +
  • -

#4 1lacca  Icon User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1