You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jon Wilmoth <jo...@yahoo.com> on 2007/06/25 23:43:45 UTC

Dynamic form-login-page?

I'm having problems using FORM authentication and a dynamic login page via Struts 2. I've tried the following web.xml/struts.xml entries with S2.0.8 & Tomcat 5.5.23, but get a 404 "The requested resource (/mywebapp/login.action) is not available" message. 

<login-config> 
<auth-method>FORM</auth-method> 
<form-login-config> 
<form-login-page>/login.action</form-login-page> 
<form-error-page>/loginFailure.action</form-error-page> 
</form-login-config> 
</login-config> 

<action name="login"> 
<result>/login.jsp</result> 
</action> 

The login action loads the login.jsp just fine when called directly, but doesn't work when invoked by the servlet container. Instead I see the following in the Tomcat log: 

Jun-25-2007 10:31:30:865 AM, PDT [DEBUG] (org.apache.catalina.authenticator.FormAuthenticator) - Save request in session '930B154E1AD9BFB1283165CD888441EF' 
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] (org.apache.catalina.core.ApplicationDispatcher) - servletPath=/login.action, pathInfo=null, queryString=null, name=null 
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] (org.apache.catalina.core.ApplicationDispatcher) - Path Based Forward 
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] (org.apache.catalina.core.ApplicationDispatcher) - Disabling the response for futher output 

I've asked on the Struts2 list if this should be possible to do and the response I got was it definitely should work. I'm wondering if there's a special Tomcat configuration (beyond my webapp's web.xml struts2 filter mapping) I need to add to enable a .action extension being used for form-authentication.

Thanks,
Jon

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org