Well I've been able to prove it's possible with S1. I added a struts 1 action to log when it was called and forward to a s1 based login.jsp and changed the web.xml to <form-login-page>/login.action</form-login-page>.
Is it possible that the architectural change to filters instead of servlets requires some sort of special configuration with container managed authentication? Is it only tomcat that requires a special struts2 configuration? ----- Original Message ---- From: Ian Roughley <[EMAIL PROTECTED]> To: Struts Users Mailing List <user@struts.apache.org> Sent: Monday, June 25, 2007 11:08:41 AM Subject: Re: [S2] login action w/FORM authentication? yes - it is definitely possible. The thing to remember is that if you are using struts2 tags (which I'm pretty sure you are), you need to redirect through an action first so the value stack is available to the tag. /Ian Jon Wilmoth wrote: >To add a little more context...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 tried configuring the app to go directly to the login jsp page, but the >struts2 tags throw the following NullPointer: > >Jun-25-2007 10:36:03:552 AM, PDT [ERROR] >(org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/mywebapp].[jsp]) > - Servlet.service() for servlet jsp threw exception >java.lang.NullPointerException > at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58) > at > org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52) > at > org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49) > at org.apache.jsp.login_jsp._jspx_meth_s2ib_005furl_005f0(login_jsp.java:503) > at org.apache.jsp.login_jsp._jspService(login_jsp.java:111) > >If this is off topic and I should post this to the Tomcat user list please let >me know...it just seems to me that other S2 users may have this same question. > >----- Original Message ---- >From: Jon Wilmoth <[EMAIL PROTECTED]> >To: user@struts.apache.org >Sent: Sunday, June 24, 2007 9:21:02 PM >Subject: [S2] login action w/FORM authentication? > > >Is it possible to use an action as the webapp's login page? 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> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]