Which Servlet spec version are you targetting? I.e. what does the start of your web.xml look like? If I recall correctly, Servlet 2.4 clarifies the semantics for form-login-config elements to explicitly allow any type of resource to be referenced. Prior to that many containers, including Tomcat (again, if I recall correctly) would only allow JSPs to be referenced there.

If you're already working to Servlet 2.4 (or updating your web.xml so you are) doesn't fix the problem, the correct place to follow up would be the Tomcat Users list, since this isn't a Struts-specific issue.

L.

Marcin Orlinski wrote:
Hello all

I have simple application (struts2) that works on Tomcat 5.5 with
DataSourceRealm. In web.xml I have:

<login-config>
        <auth-method>FORM</auth-method>
        <realm-name>myRealm</realm-name>
        <form-login-config>
                <form-login-page>/logon.jsp</form-login-page>
                <form-error-page>/logon_error.jsp</form-error-page>
        </form-login-config>
</login-config>

and everything works fine. But when I try use this:

<form-login-page>/logon.do</form-login-page>
<form-error-page>/logon_error.do</form-error-page>

and I request the secured page (/myContext/admin/users.do), server response
is:

HTTP Status 404 - /myContext/logon.do

When I request page /myContext/logon.do, this page works without problem.
struts.xml:

<package name="logon" namespace="/" extends="struts-default">
        <action name="logon" class="example.SupportAction">
                <result>/logon.jsp</result>
        </action>
        <action name="logon_error" class="example.SupportAction">
                <result>/logon_error.jsp</result>
        </action>
</package>


logon.jsp and logon_error.jsp are a simple jsp without struts tags (but I
woud like use <s:text> tag).

Can you tell me what is wrong ?

Best regards
Marcin Orlinski


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to