B
Bob Rivers
Hi,
I have a simple class :
public class MyClass {
private String attrib = null;
public MyClass() {}
public void setAttrib(String attrib) {
this.attrib = attrib;
}
public String getAttrib() {
return this.attrib;
}
}
I also have a simple JSP:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<jsp:useBean id="myclass" class="MyClass"/>
If I try to set the "attrib" property using
<c:set target="${myclass}" property="attrib" value="somevalue"/>
I got an error:
javax.servlet.jsp.JspTagException: Invalid property in <set>:
"attrib"
org.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag(SetSupport.java:160)
I tryed target="${myclass.attrib}", but I receive another error:
javax.servlet.jsp.JspException: An error occurred while evaluating
custom action attribute "target" with value "${myclass.attrib}":
Unable to find a value for "attrib" in object of class "MyClass" using
operator "." (null)
Any help?
TIA,
Bob
I have a simple class :
public class MyClass {
private String attrib = null;
public MyClass() {}
public void setAttrib(String attrib) {
this.attrib = attrib;
}
public String getAttrib() {
return this.attrib;
}
}
I also have a simple JSP:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<jsp:useBean id="myclass" class="MyClass"/>
If I try to set the "attrib" property using
<c:set target="${myclass}" property="attrib" value="somevalue"/>
I got an error:
javax.servlet.jsp.JspTagException: Invalid property in <set>:
"attrib"
org.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag(SetSupport.java:160)
I tryed target="${myclass.attrib}", but I receive another error:
javax.servlet.jsp.JspException: An error occurred while evaluating
custom action attribute "target" with value "${myclass.attrib}":
Unable to find a value for "attrib" in object of class "MyClass" using
operator "." (null)
Any help?
TIA,
Bob