• Post Reply Bookmark Topic Watch Topic
  • New Topic

NO Getter method

Abebe Belew
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running a simple Struts application and am getting this error message
No getter method for property mrn of bean org.apache.struts.taglib.html.BEAN
Here are my files. I have remoed the opening and closing tags. Please help!


<jsp:useBean id="result" class="app.RegisterForm" scope="request"/>


<html:form action="/register">
<p> Connection to DB2 </p>
Enter MRN Please: <html:text property="mrn"/>


package app;

import org.apache.struts.action.*;
import javax.servlet.http.HttpServletRequest;

public class RegisterForm extends ActionForm{

protected String mrn;

public String getMrn(){
return (this.mrn);

public void setMrn(String mrn){


import org.apache.struts.action.*;
import javax.servlet.http.*;
import java.io.*;
import java.lang.*;
import java.sql.*;

public class RegisterAction extends Action{

private String selectStr ;
protected String mrn;

public ActionForward execute (ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)

RegisterForm c = (RegisterForm) form;
mrn = c.getMrn();

// String mrn = ((RegisterForm) form).getMrn();

HttpSession session = request.getSession(true);
session.putValue("registerSess", c);

selectStr = c.queryExecute();

return mapping.findForward("success");

Marc Peabody
pie sneak
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does your action-mapping look like in struts-config?
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!