• Post Reply Bookmark Topic Watch Topic
  • New Topic

Redirecting from JSP to CGI

 
Raj Mehta
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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
 
Michael Parmeley
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • 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 ]
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!