STRUTS - No action instance for path /logoff could be created

H

Hari Om

I am working on simple Logon Application.

I am able to Logon to my Logon application and when I click the
Signout Link it gives me following errors wonder why:
-------------------------------------------------------------------------
HTTP Status 500 - No action instance for path /logoff could be created
-------------------------------------------------------------------------

I have defined Action Mappings for "logoff" in my struts.xml but still
get this error. My struts.xml is:
-----------------------------------------------------------------------------
<struts-config>
<form-beans>
<form-bean name="LogonForm" type="app.LogonForm" />
</form-beans>

<global-forwards type="org.apache.struts.action.ActionForward">
<forward name="logoff" path="/logoff.do" />
<forward name="logon" path="/logon.do" />
<forward name="welcome" path="/welcome.do" />
</global-forwards>

<action-mappings type="org.apache.struts.action.ActionMapping">
<action path="/welcome"
type="org.apache.struts.actions.ForwardAction"
parameter="/pages/welcome.jsp" />
<action path="/logon"
type="org.apache.struts.actions.ForwardAction"
parameter="/pages/logon.jsp" />
<action path="/logonSubmit" type="app.LogonAction"
name="LogonForm" scope="request" validate="true"
input="/pages/logon.jsp">
<forward name="success" path="/pages/welcome.jsp" />
</action>
<action path="/logoff" type="app.LogoffAction">
<forward name="success" path="/pages/welcome.jsp" />
</action>
</action-mappings>
<message-resources parameter="resources/application.properties" />
</struts-config>
-----------------------------------------------------------------------------

My second question is:
I try to submit the form without entering Username and password
......BUT I do not receive any errors which I have defined in
APPLICATION.PROPERTIES as:
 
W

Wendy S

Hari Om said:
I am working on simple Logon Application.

I am able to Logon to my Logon application and when I click the
Signout Link it gives me following errors wonder why:

Are you visiting /logoff, or /logoff.do? Only the second is going to work,
although I get a 404, not a 500. So my guess is that there's a problem with
app.LogoffAction. Are you sure it's correct and sitting in
/WEB-INF/classes/app/ or in a .jar file in /WEB-INF/lib with the proper
structure? What do the log files say? I bet the code in that class is
broken.
My second question is:
I try to submit the form without entering Username and password
.....BUT I do not receive any errors which I have defined in
APPLICATION.PROPERTIES as:

Did you write some validation code? Or create validation.xml and use the
Validator? (http://jakarta.apache.org/struts/userGuide/dev_validator.html)
Merely putting messages in the .properties file isn't going to do it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top