• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

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
 
This parrot is no more. It has ceased to be. Now it's a tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic