Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error no getter method ?Urgent

 
Pawan Ramchandani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<form-bean name="loginActionForm" type="org.apache.struts.validator.DynaValidatorActionForm" />

should be:

<form-bean name="loginActionForm" type="testing_code.LoginActionForm" />
 
Pawan Ramchandani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Marc
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic