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
- Happy Birthday Mom!
- 2008 - A Year in Review
- Portland Tech Meetup Tomorrow Night
- My "almost slept in a snow cave" Adventure with Clint Foster
- My Christmas Travel Adventure
- AppFuse Light converted to Maven modules, upgraded to Tapestry 5 and Stripes 1.5
- Dojo/Comet support in Java Web Frameworks
- Abbie is a Blue Skier!
- How I recovered data from my failed Linux box
- Costa Rica was Awesome!