You can write a redirect directive to browser:

HTH
Boris

private void doHttpRedirect(String what)
{
        String whereTo = "Location: "+what+"\n\n";
        try
        {
                CSpHttp.reset();
                CSpHttp.setHttpStatus(302);
                CSpider.getOutputStream().write(whereTo);
        }
        catch (Exception ex)
        {
                CSpLog.send(this, CSpLog.ERROR, "Writing HTTP redirect
command: "+
                                        ex.toString());
        }
}

> -----Original Message-----
> From: peter cheung 
> Sent: Thursday, November 04, 1999 10:59 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: [ND] Need Alternative for setExternalURL for https
> 
> 
> I know this works but I am not sure this is the best way to do it.
> 
> You can in onBeforeHtmlOutput event to get the text and modify it to what
> ever you need.
> 
> 
> 
> "Howarth, Dan" <[EMAIL PROTECTED]> wrote:
> >Am currently attempting to use the setExternalURL method to dynamically
> >change the URL  on a button but it fails with an exception since the
> >java.net.URL class does not support https.   Does anyone have a
> workaround
> >for this problem?   Any input is much appreciated.  My code is below:
> >
> >public int btSubmit_onWebEvent(CSpWebEvent event)
> >     {
> >             int command = PROCEED;
> >             
> >             CSpButton myButton = (CSpButton) event.getSource();
> >             String sessionStr = getPageSessionNvp().getNvp().toString();
> >     
> >myButton.setActionType(CSpCommand.GO_TO_EXTERNAL_URL_ACTION_TYPE);
> >             try {
> >                     myButton.setExternalURL(new 
> >     
> >URL("http://101.111.110.65/servlets/VolStatement?tbEmailAddr=" +
> >                           getDisplayFieldValue("tbEmailAddr").toString()
> >+
> >                           "&stCustomerID=" +
> >     
> >getDisplayFieldValue("hdCustomerID").toString() +
> >                           "&cbMonth=" +
> >                           getDisplayFieldValue("cbMonth").toString() +
> >                           "&sessionID=" + sessionStr));
> >                     command = doAction(event);      
> >             }
> >        catch (MalformedURLException ex) {
> >             ex.printStackTrace();
> >        }
> >
> >
> >Dan Howarth
> >Information Technology
> >PG&E Gas Transmission
> >210-528-4088
> >210-321-0911 (fax)
> >
> >
> >
> >
> >
> >PG&E Gas Transmission Texas and any other company referenced herein which
> uses the
>  PG&E name or logo are not the same company as Pacific Gas and Electric
> Company, the
>  California utility.  These companies are not regulated by the California
> Public Utilities
>  Commission, and customers do not have to buy products from these
> companies in order
>  to continue to receive quality regulated services from the utility.
> 
> _________________________________________________________________________
> 
> For help in using, subscribing, and unsubscribing to the discussion
> forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
> 
> For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to