Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Caught an exception while evaluating expression '....size()==0' against value stack  RSS feed

 
Josep M Serrainat
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I get this message when render a collection. "Caught an exception while evaluating expression 'contacts.size()==0' against value stack
java.lang.NullPointerException: target is null for method size"

The jsp is:


The method in action is:



The contacts is a collection of contact's of selected user. For verify the content of collection contacts, before return success, I add a simple iterator in method and printing in console all objects the collection, and this goes fine.
In action I have setter/getter of contact


In struts.xml i have this action specification



that I am making bad,
thanks for everything
 
Raza Mohd
Ranch Hand
Posts: 247
Java MyEclipse IDE MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi josep...

you can use Jstl function ..to retrive Collection size..



For this to work You need to include JSTL namespace

 
Josep M Serrainat
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Raza, thanks
 
Raza Mohd
Ranch Hand
Posts: 247
Java MyEclipse IDE MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have fun joseph.....('')
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!