Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I get the results of a cgi script in my JSP page?

 
David Ogasawara
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am having trouble calling a cgi script within my JSP page.
How is this done?
I have a form where the user enters a username and password. When they press the submit button, the parameters are passed to a cgi script on a different server (http://e3.uci.edu/cgi-bin/voter.cgi) which returns a result of 1 or 0.
How do I integrate this into a JSP page so I can manipulate the results?
I think I am supposed to use "dopost," but I can't seem to find much information on it.
Any help would be GREATLY appreciated!
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18156
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Open a URLConnection just like you would if you were doing it from a standalone Java app.
Of course the extra delays of going through a second server may increase your chances of the user's browser timing out, so you may have to plan accordingly.
 
David Ogasawara
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll give it a shot.
Thank you for pointing me in the right direction.
-Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic