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

Discussion in 'Java' started by Hari Om, Oct 7, 2003.

  1. Hari Om

    Hari Om Guest

    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!
    Hari Om, Oct 7, 2003
    #1
    1. Advertising

  2. Hari Om

    Wendy S Guest

    "Hari Om" <> wrote in message
    news:...
    > 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/userGuide/dev_validator.html)
    Merely putting messages in the .properties file isn't going to do it.

    --
    Wendy in Chandler, AZ
    Wendy S, Oct 8, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe Bloggs
    Replies:
    1
    Views:
    743
    Sudsy
    Aug 3, 2003
  2. rjweytens
    Replies:
    6
    Views:
    16,080
    rjweytens
    Jun 25, 2004
  3. runescience

    Struts mapping action to action???

    runescience, Feb 6, 2006, in forum: Java
    Replies:
    3
    Views:
    1,819
    runescience
    Feb 7, 2006
  4. crash.test.dummy
    Replies:
    0
    Views:
    3,601
    crash.test.dummy
    Aug 15, 2006
  5. EugeneE
    Replies:
    0
    Views:
    164
    EugeneE
    Apr 9, 2014
Loading...

Share This Page