Enables switching between HTTP and HTTPS protocols.

Class Name

atg.droplet.ProtocolChange

Component

/atg/dynamo/droplet/ProtocolChange

Required Input Parameters

inUrl

A full or relative local URL that uses the HTTP or HTTPS protocol.

Output Parameters

secureUrl

If the enable property is set to true, set to a full local URL that uses the HTTPS protocol. If the enable property is false, set to the value of inUrl.

nonSecureUrl

If the enable property is set to true, set to a full local URL that uses the HTTP protocol. If the enable property is false, this parameter is set to the value of inUrl.

Open Parameters

output

Rendered once.

Usage Notes

ProtocolChange takes a full or relative local URL and renders a full URL that uses either the secure HTTPS protocol or the standard protocol, depending on which output parameter you specify. You can use this servlet bean to switch between protocols. For example, on a commerce site, you might want to switch from HTTP to HTTPS before the customer enters personal information such as a credit card number.

In order to change the protocol, the servlet bean’s enable property must be set to true. By default, this property is set to false. When this property is false, the servlet bean sets the secureUrl and nonSecureUrl output parameters to the exact value of inUrl; it does not change the protocol or change a relative URL to a full URL. This property enables you to develop your application for a secure server even if your development environment’s server is not secure. To do this, leave the enable property set to false in your development environment, and set it to true in the production environment.

Example

<dsp:droplet name="/atg/dynamo/droplet/ProtocolChange">
  <dsp:param name="inUrl" value="../checkout/creditcard.jsp"/>
  <dsp:oparam name="output">
    <dsp:getvalueof var="a6" param="secureUrl" vartype="java.lang.String">
      <dsp:a href="${a6}">Enter credit card information</dsp:a>
    </dsp:getvalueof>
  </dsp:oparam>
</dsp:droplet>

Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices