This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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: 18009
47
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