struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Wilmoth <jonwilm...@yahoo.com>
Subject Re: [S2] login action w/FORM authentication?
Date Mon, 25 Jun 2007 17:38:31 GMT
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 <jonwilmoth@yahoo.com>
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>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message