aspose file tools*
The moose likes Struts and the fly likes  Looking for Action instance for class test.struts.LoginAction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark " Looking for Action instance for class test.struts.LoginAction" Watch " Looking for Action instance for class test.struts.LoginAction" New topic
Author

Looking for Action instance for class test.struts.LoginAction

rakshini nithya
Ranch Hand

Joined: Jun 15, 2006
Posts: 39
hi
am developing an application in strutsmy jboss server runs up to this
Looking for Action instance for class test.struts.LoginAction
but it cannot locate the action file
but i have mapped the action files creately
can anyone help me in this issue
vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580
Show your entries in the struts-config file
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

Moved to the Struts forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
rakshini nithya
Ranch Hand

Joined: Jun 15, 2006
Posts: 39
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

<struts-config>

<!-- ========== Form Bean Definitions ============ -->
<form-beans>
<form-bean name="login" type="test.struts.LoginForm" />
</form-beans>


<!-- ========== Global Forward Definitions ========= -->
<global-forwards>
</global-forwards>


<!-- ========== Action Mapping Definitions ======== -->
<action-mappings>
<action
path="/login"
type="test.struts.LoginAction"
name="login"
input="/LoginView.jsp"
validate="true">

<forward name="valid" path="/MainMenu.jsp" />
<forward name="invalid" path="/LoginView.jsp" />
</action>
</action-mappings>

</struts-config>
vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580
check whether LoginAction and LoginForm correctly falls under package structure test.struts

Also Check whether LoginAction extends Action class and LoginForm extends ActionForm
rakshini nithya
Ranch Hand

Joined: Jun 15, 2006
Posts: 39
Yes both are inside the same package,
and they are also extedning Action and ActionForm
vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580
Show your jsp and stack trace of errors
[ June 16, 2006: Message edited by: vidya sagar ]
rakshini nithya
Ranch Hand

Joined: Jun 15, 2006
Posts: 39
<!-- LoginView.jsp -->

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts.tld" prefix="struts" %>

<HTML>
<HEAD><TITLE>Login Screen</TITLE></HEAD>
<BODY>
<H2>Enter your user information</H2>
<html:errors />
<html:form action="login.do">
<p>
User ID:
<html:text property="userId" size="10" />
<br>
Password:
<html assword property="passWord" size="10" />
<br><br>
<html:submit>
Login
</html:submit>
</html:form>
</BODY>
</HTML>
vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580
<html:form action="login.do">


change to
<html:form action="/login.do">

Try now.Still error show Stack trace error too.
 
wood burning stoves
 
subject: Looking for Action instance for class test.struts.LoginAction