Hi!

My web application is large and consists of Struts, T4 and T5 pages. In
Struts and T4, I use the current http request to figure out whether to use
https or not. Users can choose if they want to log in using https or not.
The chosen protocol is used on all pages after login.

In T5, this is either a global static setting, or a static setting per page.
Is there a service or something I can override to implement my own "protocol
builder"? Something like this:

public class HttpProtocolBuilder {
  public HttpProtocolBuilder (final HttpServletRequest request) {
    this.request = request
  }

  public String getProtocol() {
    if (request.isSecure()) {
      return "https";
    }
    else {
     return "http";
     }
}

Regards

Inge

Reply via email to