Tuesday December 10, 2002
Forcing SSL on a JSP
I'm trying to replicate the behavior that occurs when you set
<%
// TODO: Make this into a tag library
Boolean secureLogin = (Boolean)application.getAttribute(Constants.SECURE_LOGIN);
System.out.println("secureLogin: " + secureLogin);
if (secureLogin.booleanValue()) {
// make sure we're using https
if (request.getScheme().equals("http")) {
String redirectString = SslUtil.getRedirectString(request,
application,
true);
System.out.println("redirecting to: " + response.encodeRedirectURL(redirectString));
%>
<logic:redirect href="<%=response.encodeRedirectURL(redirectString)%>"/>
<%
}
}
%>
Everything looks the same in Tomcat's log when using either browser.
Posted in Java
at Dec 10 2002, 10:10:25 AM MST
Add a Comment
Search This Site
Recent Entries
- Wine Tasting in Napa Valley
- How to build a Shot-Ski
- Bus Project Update
- Farewell to the 2011-2012 Ski Season
- Cruising around the Western Caribbean
- Spring Break!
- A Spectacular Trip to Stockholm and Madrid
- Comparing Web Frameworks and HTML5 with Play Scala at Jfokus 2012
- Play Framework 2.0 with Peter Hilton at Jfokus
- Secure JSON Services with Play Scala and SecureSocial