Wednesday August 28, 2002
Invalid Reference to Login Page. If you're using form-based authentication in your Tomcat Application - you might've seen this error before:
Apache Tomcat/4.0.4 - HTTP Status 400 - Invalid direct reference to form login page
type: Status report
message: Invalid direct reference to form login page
description: The request sent by the client was syntactically incorrect (Invalid direct reference to form login page).
Well, the good news is - I figured out how to get around this today. Basically, it's caused when someone tried to go directly to your <form-login-page> to login, rather than a protected resource.
I use my index.jsp (welcome-file-list) page to do a redirect to a projected resource:
index.jsp -------- <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <logic:redirect page="/do/mainMenu"/%gt;
So I merely added the error-page declaration below to my web.xml, and whalla - no more error message!
<error-page>
<!-- 400 code is from trying to go directly to login.jsp -->
<error-code>400</error-code>
<location>/index.jsp</location>
</error-page>
Posted in Java
at Aug 28 2002, 06:07:51 AM MDT
5 Comments
Search This Site
Recent Entries
- Secure JSON Services with Play Scala and SecureSocial
- My What's New in Spring 3.1 Presentation
- Twitter's Open Source Summit: Bootstrap 2.0 Edition
- Refreshing AppFuse's UI with Twitter Bootstrap
- 2011 - A Year in Review
- Upgrading AppFuse to Spring Security 3.1 and Spring 3.1
- What have I been working on at Taleo?
- Our Engaging Trip to Paris and Antwerp
- My HTML5 with Play Scala, CoffeeScript and Jade Presentation from Devoxx 2011
- Deploying Java and Play Framework Apps to the Cloud with James Ward
Posted by bug-bug on July 26, 2004 at 01:09 AM MDT #
Posted by Matt Raible on July 26, 2004 at 08:34 AM MDT #
Posted by vincenzo on January 12, 2007 at 03:57 AM MST #
Posted by vincenzo on January 12, 2007 at 05:27 AM MST #
Posted by 217.74.68.2 on May 21, 2008 at 04:25 AM MDT #