setter « Tag « JSP-Servlet Q&A





1. JSP custom tag library (Unable to find setter method for the attribute)    stackoverflow.com

I'm having trouble with a custom tag:- org.apache.jasper.JasperException: /custom_tags.jsp(1,0) Unable to find setter method for attribute : firstname This is my TagHandler class:

package com.cg.tags;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

public class NameTag extends TagSupport{

   ...

2. Is it possible to create custom attribute in jsp tag library without defining setter method?    stackoverflow.com

I don't want to change the java code whenever there is addition of tag if the business logic will be remain same. I can access it by using Enumeration set of ...

3. cannot find setter in jsp    stackoverflow.com

Ok, so I'm calling this custom tag:

<%@ tag body-content="scriptless" import="java.util.*,com.serco.inquire.*,java.lang.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ attribute name="theID" required="true" %>
<%@ attribute name="aUser" required="true" %>
 ... do stuff with variables here...
With this code ...