• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll give it a shot.
Thank you for pointing me in the right direction.
-Dave
 
There are 10 kinds of people in this world. Those that understand binary get this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic