• Post Reply Bookmark Topic Watch Topic
  • New Topic

What's wrong with my customTag?  RSS feed

 
Zhang Jones
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!
I can't find any problem in my project, anyone else can help me find out the fault and offer modify ideas?
Movie

SimpleTagTest


simple.tld

useTag.jsp

customTag
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before even looking at anything, what is your problem exactly ? An error displayed somewhere ? Nothing displayed ?

Did you check the HTML source ?
 
Zhang Jones
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
org.apache.jasper.JasperException: An exception occurred processing JSP page /useTag.jsp at line 40

39: <table>
40: <myTags:SimpleTagTest movieList="${movie}">
41: <tr>
42: <td>${movie.name}</td>
43: <td>${movie.genre}</td>
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the object bound to the name "movie" is somehow both a list of items and a single item?
 
Zhang Jones
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a list of items
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but your tag library then sets the name "movie" to be an item and the JSTL refers to ${movie.name}
It can't be both.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!