This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

Why i got error when i run the the code  RSS feed

Indravadan T Patel
Posts: 29
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi All,

i here show you my JSP, TLD and Taghandler class.
<%@ taglib uri="/WEB-INF/tlds/SimpleTag.tld" prefix="csajsp" %>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>

<csajsp:Multi length="20"/><br>
<csajsp:Multi length="40"/>

<?xml version="1.0" encoding="UTF-8"?>
<taglib version="2.0" xmlns="" xmlns:xsi="" xsi:schemaLocation=" web-jsptaglibrary_2_0.xsd">
package indra;

import java.math.BigInteger;
import javax.servlet.jsp.tagext.*;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.JspException;
import java.math.*;
public class SimplePrimeTag extends TagSupport {
private String length="60";
// private boolean length;

public int doStartTag() {
try {
JspWriter out = pageContext.getOut();
int len = Integer.parseInt(getLength());
out.println("Multiplication :" +len*len);
} catch (Exception ex) {


return (SKIP_BODY);

public boolean isLength(){
return true;

public void setLength(String length) {
this.length = length;

public String getLength() {
return length;

and i got error like that :

org.apache.jasper.JasperException: /index.jsp(11,12) Unable to find setter method for attribute: length


Indravadan Patel
Christophe Verré
Posts: 14691
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not duplicate posts. Continue the discussion in the original thread.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!