Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > STRUTS - No action instance for path /logoff could be created

Reply
Thread Tools

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

 
 
Hari Om
Guest
Posts: n/a
 
      10-07-2003
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:
-------------------------------------------------------------------------
error.username.required=<LI>Username is required</LI>
error.password.required=<LI>Password is required</LI>
-------------------------------------------------------------------------

Any help on this is appreciated!

THANKS for your great book!
 
Reply With Quote
 
 
 
 
Wendy S
Guest
Posts: n/a
 
      10-08-2003
"Hari Om" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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
> -------------------------------------------------------------------------


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:
> -------------------------------------------------------------------------
> error.username.required=<LI>Username is required</LI>
> error.password.required=<LI>Password is required</LI>
> -------------------------------------------------------------------------


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

--
Wendy in Chandler, AZ


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can we call an Action from another Action in struts??? vyshu Java 1 04-27-2007 09:19 AM
No action instance for path /foobar could be created crash.test.dummy Java 0 08-15-2006 08:14 PM
Struts mapping action to action??? runescience Java 3 02-07-2006 04:07 PM
Struts Forward to an Action from an to Action and URLs rjweytens Java 6 06-25-2004 01:49 PM
Struts Static Action Form vs Dyanamic Action Form Joe Bloggs Java 1 08-03-2003 02:30 AM



Advertisments