• Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing arrays of objects in jsp using custom tags  RSS feed

 
sachin katarki
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi All,

I have declared a custom tag which I have mentioned it in TLD and web.xml file ,in the tag handler class I have Instantiated the object of other class In which I have declared and initialized the array of objects, using custom tags in JSP I am trying to access the array of object with specific index and with specific member variable which is public.

"In JSP code "
<prefix:tagname var="handler">

using handler I am accessing array of objects and printing it.
<Cut value="${handler.arrayofobject.[0].membervaraiable}"/> but i am not able to print the member variable value after lots of try javascript:emoticon('');

P.S: I have seen using custom tags being used like this I just wanted to know if I have missed some thing OR can I directly use the handler to access the array of objects. Any suggestions and reply is of great help

 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that ${handler.arrayofobject[0].membervaraiable} is more likely to be correct than ${handler.arrayofobject.[0].membervaraiable} is.
 
sachin katarki
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry for my typo in my code I accessed it correctly `<Cut value="${handler.arrayofobject[0].membervaraiable}"/>` , still it was not working.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!