• 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

Redirecting from JSP to CGI

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In my JSP page, I want to redirect to a CGI script which is also running on the same server. The CGI expects the request to be POST and also all the request parameters received by the JSP should be passed to the CGI. Some of the request parameters are of type "file". Can somebody show me how to do this?

Thanks
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What language is your CGI script going to be written in?

For that matter why don't you just re-write your CGI script in Java?

If you just need the filename of the File Object you will just need to pass the filename as a parameter in a hidden field on a form. Then open the file as appropriate with whatever language your CGI script is written in.
[ August 25, 2004: Message edited by: Michael Parmeley ]
 
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried something like:

I've never done this but, provided that your request is submitted using HTTP POST and you have a /cgi-bin directory under the root context, I see no reason why this wouldn't work in principle.

Jules
reply
    Bookmark Topic Watch Topic
  • New Topic