Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Pass non string object as attribute to Tag File

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all

I am trying to create a tag file to display the contents of an ArrayList as Unordered List.
For this I need to pass an ArrayList Object to the tag file.

Here is what I have done.

The jsp file:




The tag file:



However this doesnt seem to work.
Where am I mistaken??
please help.

Thank you

Sudhanshu

 
Sheriff
Posts: 67537
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Of course not. You are mixing scriptlets with the EL. Won't work.

Either stay in 2002 and continue to use scriptlets, or join us in 2009 and leave scriptlets on the scrap heap where they belong.
 
Sudhanshu Gupta
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear Bibeault
Thank you very much for such a quick response.
I used the scriptlets just for testing the tag file.
Lazy me.
I created the list object in a servlet now and its working as expected.

Thank you very much.

 
reply
    Bookmark Topic Watch Topic
  • New Topic