This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

javax.servlet.jsp.JspException: No getter method for property: "id" of bean: "Login.LoginForm"  RSS feed

Vish Murthy
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I am getting an error "javax.servlet.jsp.JspException: No getter method for property: "id" of bean: "Login.LoginForm" can any one help please. I am pasting my code

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"


<!-- ================================================ Form Bean Definitions -->

<!-- ================================================ Form Bean Definitions -->


name="LoginForm" type="Login.LoginForm" >


<!-- ========================================= Global Exception Definitions -->

<!-- sample exception handler
end sample -->


<!-- =========================================== Global Forward Definitions -->


<!-- <forward name="/login" path="/jsp/login.html" /> -->

<!-- =========================================== Action Mapping Definitions -->


<action path="/loginPage" validation="false" input="/index.jsp" name="LoginForm" type="Login.LoginAction" parameter="method">
<forward name="success" path="/Jsp/MainPage.jsp" />


<!-- ======================================== Message Resources Definitions -->

<!-- <message-resources parameter="com.heb.operations.odc.pat.resources.ApplicationResources" /> -->

<!-- =================================================== Validator plugin -->

<plug-in className="org.apache.struts.validator.ValidatorPlugIn">



<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">

<%@ page language="java" %>
<%@ taglib uri="" prefix="bean"%>
<%@ taglib uri="" prefix="html"%>
<%@ taglib uri="" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-layout.tld" prefix="layout" %>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

<html:form action="/loginPage" method="post">
<table align="center">
<td><B>Mini Project</B> </td>

<table align="center">

<td> Login </td>
<html:text property="id"> </html:text>
<td>Password </td>
<td><html:text property= "pass"> </html:text></td>




package Login;

import org.apache.struts.action.ActionForm;

public class LoginForm extends ActionForm{

private String id ;
private String pass;
private String errorDesc;

public String getId() {
return id;
public void setId(String id) { = id;
public String getPass() {
return pass;
public void setPass(String pass) {
this.pass = pass;
public String getErrorDesc() {
return errorDesc;
public void setErrorDesc(String errorDesc) {
this.errorDesc = errorDesc;


package Login;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

public class LoginAction extends DispatchAction{

public ActionForward vlidateLogin(ActionMapping mapping,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res)

return mapping.findForward("success");



Bear Bibeault
Author and ninkuma
Posts: 66205
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!