aspose file tools*
The moose likes Struts and the fly likes error no getter method ?Urgent 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 "error no getter method ?Urgent" Watch "error no getter method ?Urgent" New topic
Author

error no getter method ?Urgent

Pawan Ramchandani
Ranch Hand

Joined: Aug 15, 2003
Posts: 78
hello,

when i am running my application i am getting error no getter method found for property pass type.

Decription of varius files i am using


JSP PAGE:-
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<html:html>
<head>
<title>
<bean:message key="app.title"/>
</title>
</head>
<body bgcolor="#c0c0c0">
<html:errors/>
<h1>
Welcome
</h1>
<html:form action="/loginAction" method="post">
<html assword property="pass" size="18"></html assword>
<html:text property="email" size="18"></html:text>
<br><br>
<html:submit value="Submit" property="submit"/>
<html:reset value="Reset"/>
</html:form>
</body>
</html:html>


ACTION FORM:-

package testing_code;

import org.apache.struts.validator.ValidatorForm;
import javax.servlet.http.*;

public class LoginActionForm extends ValidatorForm
{
private String email;
private String pass;

public String getEmail()
{
return email;
}

public void setEmail(String email)
{
this.email = email;
}

public String getPass()
{
return pass;
}

public void setPass(String pass)
{
this.pass = pass;
}
}


STRUTS-CONFIG:-

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<data-sources>
<data-source key="Database" type="org.apache.commons.dbcp.BasicDataSource">
<set-property property="driverClassName" value="org.gjt.mm.mysql.Driver" />
<set-property property="url" value="jdbc:mysql://lancashire/Test" />
<set-property property="username" value="root" />
<set-property property="password" value=" " />
</data-source>
</data-sources>
<form-beans>
<form-bean name="loginActionForm" type="org.apache.struts.validator.DynaValidatorActionForm" />
</form-beans>
<action-mappings>
<action input="/index.jsp" name="loginActionForm" path="/loginAction" scope="session" type="testing_code.LoginAction">
<forward name="pass" path="/userSuccess.jsp" />
<forward name="fail" path="/userFailure.jsp" />
</action>
</action-mappings>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>
</struts-config>

how can i sort the problem pls. help

Thanks in advance


Pawan Ramchandani<br />*******************************<br />SCJP 1.4<br />SCWCD <br />*******************************<br />Everything is okay in the end. If it's not okay, then it's not the end.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

<form-bean name="loginActionForm" type="org.apache.struts.validator.DynaValidatorActionForm" />

should be:

<form-bean name="loginActionForm" type="testing_code.LoginActionForm" />


A good workman is known by his tools.
Pawan Ramchandani
Ranch Hand

Joined: Aug 15, 2003
Posts: 78
Thanks Marc
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error no getter method ?Urgent