You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by kelly lan <ke...@yahoo.com> on 2002/04/04 12:35:56 UTC
No action instance for path
Hi,
In my logon page ,I logon with user name and user
password,when I submit I get the error:
No action instance for path /verifyAction could be
created
This is my logon page:
..
<html:form action="/verifyAction" focus="username">
<table border="0" width="200">
<tr>
<td width="56"><font size="2"
color="#CC0000"></font></td>
<td width="134">UserName: <font size="2">
<html:text property="username"/>
</font></td>
</tr>
<tr>
<td width="56"><font size="2"
color="#CC0000">Password:</font></td>
<td width="134"> <font size="2">
<html:password property="password"/>
</font></td>
</tr>
<tr bgcolor="#7B889F">
<td>
<html:submit property="submit"value="
"/></td>
<td>
<input type="reset" name="reset1" value="
"></td>
</tr>
</table>
</html:form>
This is my struts_config.xml:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config
SYSTEM
"FILE:/WebSphere/AppServer/dtds/struts-config_1_0.dtd">
<!--
This is a blank Struts configuration file based
on the example application,
with commented examples of some items.
NOTE: If you have a generator tool to create the
corresponding Java classes
for you, you could include the details in the
"form-bean" declarations.
Otherwise, you would only define the "form-bean"
element itself, with the
corresponding "name" and "type" attributes, as
shown here.
-->
<struts-config>
<!-- ========== Data Source Configuration
=============================== -->
<!--
<data-sources>
<data-source
autoCommit="false"
description="Example Data Source Configuration"
driverClass="org.postgresql.Driver"
maxCount="4"
minCount="2"
password="mypassword"
url="jdbc:postgresql://localhost/mydatabase"
user="myusername"
/>
</data-sources>
-->
<!-- ========== Form Bean Definitions
=================================== -->
<form-beans>
<!-- Example logon form bean
<form-bean name="logonForm"
type="org.apache.struts.example.LogonForm"/>
-->
<form-bean name="logonForm"
type="org.apache.struts.webapp.example.LogonForm"/>
</form-beans>
<!-- ========== Global Forward Definitions
============================== -->
<global-forwards>
<!-- Example logon forward
<forward name="logon"
path="/logon.jsp"/>
-->
<forward name="success"
path="/test/confirm.jsp"/>
</global-forwards>
<!-- ========== Action Mapping Definitions
============================== -->
<action-mappings>
<!-- Display the "confirm.html" documentation -->
<action path="/confirmhtml"
forward="/test/confirm.html">
</action>
<!-- Display the "confirm.jsp" documentation -->
<action path="/confirmjsp"
forward="/test/confirm.jsp">
</action>
<!-- Display the verifyAction documentation -->
<action path="/verifyAction"
type="org.apache.struts.webapp.example.VerifyAction"
name="logonForm"
scope="request"
input="/index.jsp">
<forward name="success"
path="/test/confirm.jsp"/>
</action>
<!-- The standard administrative actions available
with Struts -->
<!-- These would be either omitted or protected by
security -->
<!-- in a real application deployment -->
<action path="/admin/addFormBean"
type="org.apache.struts.actions.AddFormBeanAction"/>
<action path="/admin/addForward"
type="org.apache.struts.actions.AddForwardAction"/>
<action path="/admin/addMapping"
type="org.apache.struts.actions.AddMappingAction"/>
<action path="/admin/reload"
type="org.apache.struts.actions.ReloadAction"/>
<action path="/admin/removeFormBean"
type="org.apache.struts.actions.RemoveFormBeanAction"/>
<action path="/admin/removeForward"
type="org.apache.struts.actions.RemoveForwardAction"/>
<action path="/admin/removeMapping"
type="org.apache.struts.actions.RemoveMappingAction"/>
</action-mappings>
</struts-config>
Thank for you!
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: No action instance for path
Posted by "David M. Karr" <dm...@earthlink.net>.
>>>>> "kelly" == kelly lan <ke...@yahoo.com> writes:
kelly> Hi,
kelly> In my logon page ,I logon with user name and user
kelly> password,when I submit I get the error:
kelly> No action instance for path /verifyAction could be
kelly> created
kelly> This is my logon page:
kelly> ..
kelly> <html:form action="/verifyAction" focus="username">
Are you mapping to ActionServlet using extension mapping, or path mapping?
This is specified in your "web.xml" file. if you're using extension mapping,
your "action" attribute in "html:form" should be "/verifyAction.do".
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: No action instance for path
Posted by Alex Paransky <ap...@standardset.com>.
I am not an expert in Struts, but in my development I have been using the
.do extension when specifying any references to Struts actions from .jsp
pages, so my code would look like:
<html:form action="/verifyAction.do" focus="username">
If you are using the .do extension method, try this.
-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127
-----Original Message-----
From: kelly lan [mailto:kelly_lan999@yahoo.com]
Sent: Thursday, April 04, 2002 2:36 AM
To: Struts User
Subject: No action instance for path
Hi,
In my logon page ,I logon with user name and user
password,when I submit I get the error:
No action instance for path /verifyAction could be
created
This is my logon page:
..
<html:form action="/verifyAction" focus="username">
<table border="0" width="200">
<tr>
<td width="56"><font size="2"
color="#CC0000"></font></td>
<td width="134">UserName: <font size="2">
<html:text property="username"/>
</font></td>
</tr>
<tr>
<td width="56"><font size="2"
color="#CC0000">Password:</font></td>
<td width="134"> <font size="2">
<html:password property="password"/>
</font></td>
</tr>
<tr bgcolor="#7B889F">
<td>
<html:submit property="submit"value="
"/></td>
<td>
<input type="reset" name="reset1" value="
"></td>
</tr>
</table>
</html:form>
This is my struts_config.xml:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config
SYSTEM
"FILE:/WebSphere/AppServer/dtds/struts-config_1_0.dtd">
<!--
This is a blank Struts configuration file based
on the example application,
with commented examples of some items.
NOTE: If you have a generator tool to create the
corresponding Java classes
for you, you could include the details in the
"form-bean" declarations.
Otherwise, you would only define the "form-bean"
element itself, with the
corresponding "name" and "type" attributes, as
shown here.
-->
<struts-config>
<!-- ========== Data Source Configuration
=============================== -->
<!--
<data-sources>
<data-source
autoCommit="false"
description="Example Data Source Configuration"
driverClass="org.postgresql.Driver"
maxCount="4"
minCount="2"
password="mypassword"
url="jdbc:postgresql://localhost/mydatabase"
user="myusername"
/>
</data-sources>
-->
<!-- ========== Form Bean Definitions
=================================== -->
<form-beans>
<!-- Example logon form bean
<form-bean name="logonForm"
type="org.apache.struts.example.LogonForm"/>
-->
<form-bean name="logonForm"
type="org.apache.struts.webapp.example.LogonForm"/>
</form-beans>
<!-- ========== Global Forward Definitions
============================== -->
<global-forwards>
<!-- Example logon forward
<forward name="logon"
path="/logon.jsp"/>
-->
<forward name="success"
path="/test/confirm.jsp"/>
</global-forwards>
<!-- ========== Action Mapping Definitions
============================== -->
<action-mappings>
<!-- Display the "confirm.html" documentation -->
<action path="/confirmhtml"
forward="/test/confirm.html">
</action>
<!-- Display the "confirm.jsp" documentation -->
<action path="/confirmjsp"
forward="/test/confirm.jsp">
</action>
<!-- Display the verifyAction documentation -->
<action path="/verifyAction"
type="org.apache.struts.webapp.example.VerifyAction"
name="logonForm"
scope="request"
input="/index.jsp">
<forward name="success"
path="/test/confirm.jsp"/>
</action>
<!-- The standard administrative actions available
with Struts -->
<!-- These would be either omitted or protected by
security -->
<!-- in a real application deployment -->
<action path="/admin/addFormBean"
type="org.apache.struts.actions.AddFormBeanAction"/>
<action path="/admin/addForward"
type="org.apache.struts.actions.AddForwardAction"/>
<action path="/admin/addMapping"
type="org.apache.struts.actions.AddMappingAction"/>
<action path="/admin/reload"
type="org.apache.struts.actions.ReloadAction"/>
<action path="/admin/removeFormBean"
type="org.apache.struts.actions.RemoveFormBeanAction"/>
<action path="/admin/removeForward"
type="org.apache.struts.actions.RemoveForwardAction"/>
<action path="/admin/removeMapping"
type="org.apache.struts.actions.RemoveMappingAction"/>
</action-mappings>
</struts-config>
Thank for you!
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>