• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSTL c:set exception

 
Rick DeBay
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSTL doesn't see "name" as a valid property for c:set, but c.out has no problem printing it. Any ideas?
exception:
javax.servlet.ServletException: Invalid property in <set>: "name"
JSTL:
<c ut value="${onlineCategory.name}"/>
<c:set target="onlineCategory" property="name" value=""/>
class:
//hack to display fixed categories until back end is working
import java.util.*;
public class Category
{
public int ID;
public String name;
public List subCategories = new ArrayList();
public Category(int ID, String name)
{
this.ID = ID;
this.name = name;
}
public void addSubCategory(Category c)
{
subCategories.add(c);
}
public int getID() {return ID;}
public String getName() {return name;}
public List getSubCategories() {return subCategories;}
public void setID(int id) {ID = id;}
public void setName(String n) {name = n;}
}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!