You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Hari Om <ha...@hotmail.com> on 2003/10/07 23:31:16 UTC

No action instance for path /logoff could be created

I am working on a 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!

_________________________________________________________________
Instant message with integrated webcam using MSN Messenger 6.0. Try it now 
FREE!  http://msnmessenger-download.com


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: No action instance for path /logoff could be created

Posted by Ted Husted <hu...@apache.org>.
HTTP Status 500 usually means the Action class name was misspelled or is 
otherwise not on the class path. The Action couldn't be created because 
the Controller couldn't find it.

If you don't see the error messages, check the source to be sure the 
formatting is correct. Sometimes things don't display because of HTML 
issues. Otherwise, be sure the validate method is setup correctly, or 
the Validator form in the alternative.

HTH, Ted.

Hari Om wrote:

> I am working on a 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!
> 
> _________________________________________________________________
> Instant message with integrated webcam using MSN Messenger 6.0. Try it 
> now FREE!  http://msnmessenger-download.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 

-- 
Ted Husted,
   Junit in Action  - <http://www.manning.com/massol/>,
   Struts in Action - <http://husted.com/struts/book.html>,
   JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Problem with Custom Request Processor

Posted by Robert Nicholls <ni...@ll.mit.edu>.
Hi:
I am trying to set up a test custom request processor for security
checks.  In addition I am using tiles for the view component. Here is
the struts-config.xml:

<struts-config>
        <form-beans />
        <global-forwards><forward name="ERROR"
path="/Error.jsp"/></global-forwards>
        <action-mappings>
                <action forward="test.defineBasic" path="/basic" />
                <action type="tiles.Welcome" path="/welcome">
                        <forward name="success" path="/simple.jsp"
redirect="false" />
                </action>
        </action-mappings>
        <!-- my controller that extends
org.apache.struts.tiles.TilesRequestProcess -->
        <controller
processorClass="tiles.controller.LocalRequestProcessor" locale="false"
nocache="true" inputForward="true" />
        <plug-in className="org.apache.struts.tiles.TilesPlugin">
                <set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
        </plug-in>
</struts-config

 In addition, the web.xml has the standard action servlet defined as
Tomcat doesn't seem to like the Tiles servlet.

<servlet>
                <servlet-name>action</servlet-name>
 
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
 
<!--<servlet-class>org.apache.struts.tiles.ActionComponentServlet</servl
et-class>-->
                <init-param>
                        <param-name>config</param-name>
 
<param-value>/WEB-INF/struts-config.xml</param-value>
                </init-param>
                <init-param>
                        <param-name>debug</param-name>
                        <param-value>2</param-value>
                </init-param>
                <init-param>
                        <param-name>definitions-config</param-name>
 
<param-value>/WEB-INF/tiles-defs.xml</param-value>
                </init-param>
                <init-param>
 
<param-name>definitions-parser-validate</param-name>
                        <param-value>true</param-value>
                </init-param>
        </servlet>
While the system operates, the custom request processor clearly isn't
being invoked.
Any ideas? What should I be extending to get the processPreprocessor?

Thanks in advance,

Bob Nicholls
MIT Lincoln Laboratory


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org