You can use a request dispatcher for redirecting servlets.

javax.servlet.RequestDispatcher dispatcher = context.getRequestDispatcher( url
);
dispatcher.forward( request, response );

Where url can be any valid url ( like your cgi ) and the variable named
'context' has to be
your ServletContext.

I never used this code to redirect to a cgi, but i think it should work with
any url.

Matthias Kümpel


Paulo Moreira wrote:

> Anyone can tell me if there is some way to redirect a  servlet
> request to a CGI in a remote server. I know that i can do this using
> the classes in java.net package but I need some other way to do this
> in an automatic way. I have a HTML form that also haves a KEYGEN tag.
> If a read the value of the keygen tag with the getParameter method i
> loose some information. I need to redirect this value intead of
> reading it and posting it in the CGI.
>
>                        Paulo Moreira - Braga, Portugal
>
> __________________________________________________________
> Mensagem enviada pelo Xekmail: webmail grátis do AEIOU
> http://xekmail.aeiou.pt
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to