wood burning stoves 2.0*
The moose likes Struts and the fly likes org.apache.jasper.JasperException: /index.jsp(16,0) Unable to find setter method for attribute: name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "org.apache.jasper.JasperException: /index.jsp(16,0) Unable to find setter method for attribute: name" Watch "org.apache.jasper.JasperException: /index.jsp(16,0) Unable to find setter method for attribute: name" New topic
Author

org.apache.jasper.JasperException: /index.jsp(16,0) Unable to find setter method for attribute: name

Raghunatha KM
Greenhorn

Joined: Dec 18, 2008
Posts: 1
HI

I am doing example project using struts, tiles , but have some problem in beginning...

Below is index.jsp:

<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%>
<html:html>
<head>
<script>
function submitPage(){
document.loginForm.submit();
}
</script>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="Rational Software Architect">
<link rel="stylesheet" href="./themes/banking.css" type="text/css">
</head>
<body onload="submitPage()">
<html:form action="/index" name="loginForm"
type="com.cts.banking.formbeans.LoginForm"/>

</body>
</html:html>




Definition in tiles-defs.xml:

<definition name="LoginHomeDefinition"
path="/LoginTiles/loginbaseLayout.jsp">
<put name="title" value="CIBC Home" />
<put name="headerArea" value="/LoginTiles/loginheaderPage.jsp" />
<put name="errorArea" value="/errorPage.jsp" />
<put name="navigation1" value="/LoginTiles/loginNaviPage1.jsp"></put>
<put name="body" value="/Login.jsp" />
<put name="navigation2" value="/LoginTiles/loginNaviPage2.jsp"></put>
<put name="footerArea" value="/footerPage.jsp"></put>
</definition>



Action mappings and formbean in struts-config.xml:


<form-bean name="loginForm" type="com.cts.banking.formbeans.LoginForm"/>

<action forward="LoginHomeDefinition" path="/index"/>

<action input="LoginHomeDefinition" name="loginForm" path="/LoginAction"
scope="request" type="com.cts.banking.actions.LoginAction" validate="true">
<forward name="failure" path="LoginHomeDefinition"/>
<forward name="AdminSuccess" path="adminHomeDef"/>
<forward name="CustomerSuccess" path="CustomerHomeDef"/>
</action>



when i run the project, i am getting below error.


org.apache.jasper.JasperException: /index.jsp(16,0) Unable to find setter method for attribute: name
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
at org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2736)
at org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2965)
at org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2169)
at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1689)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1705)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
at org.apache.jasper.compiler.Generator.generate(Generator.java:3374)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:210)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)




Can anyone please help me in overcoming this problem.

Raghu.


 
It is sorta covered in the JavaRanch Style Guide.
 
subject: org.apache.jasper.JasperException: /index.jsp(16,0) Unable to find setter method for attribute: name
 
Similar Threads
struts framework
JSTL Function import error
Error: while running jsp on tomcat
Exception creating bean of class
jsp:useBean exception