I have a small tricky to do it

-       your 1.jsp save that parameter in session, ex: name it with
(String)param
-       redirect to 2.jsp
-       2.jsp read param session
-       2.jsp contain html and form inside
        <form action= method=post>  ..<input type=hidden value=<%=param%>
</form>
-       combine with javascript when the body onLoad document.form.submit

it is more secure than redirect an show parameter on its address

-dwi, unocal76


> -----Original Message-----
> From: Vibha Jindal [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, December 19, 2001 1:22 PM
> To:   [EMAIL PROTECTED]
> Subject:      Forwarding a request to a cgi script on a different machine
>
> Hi,
>
> I am making a web application using Iplanet Application Server.
> I am using Oracle 6i to genrate reports. The reports are generated by
> invoking a cgi script of Oracle Reports 6i. If I use
> response.sendRedirect,
> it works.
>
> res.sendRedirect
> ("http://157.227.15.228/cgi-bin/script?server=REP60_WisperSu
> n&report=Audits_CoverSheet.RDF&destype=cache&paramform=no&userid=eaton/eat
> on
>
> @wisper&pagestreaming=no&p_auditid=1372&p_format=HTML&desformat=HTML");
>
>
> But, the problem is, that I don't want to show all these variables in the
> URL. Basically, I don't not want to use a query string. I want to use the
> POST method.
> But, I also do not want to use hidden fields in a form as teh user can
> view
> its source.
> I want to submit a form using 'Post' to a servlet and then forward the
> request to a JSP, which will add more parameters to the request and in
> turn
> forward it to the cgi script.
>
> The Report server, which has the cgi script and my application are on
> different machines.
>
> I tried forwarding the request from the servlet to the cgi script.
> RequestDispatcher dispatcher =
> this.getServletContext().getRequestDispatcher
> ("http://157.227.15.228/cgi-bin
> /script");
> dispatcher.forward(req,res);
>
> But this doesn't work.
>
> 1. Is it possible to forward a request to a cgi script?
> 2. How do I give teh absolute path, as they are on different machines?
>
> Regards,
> Vibha
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to