• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jstl tags

 
Shiny Suresh
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am new to Java. I need help converting this scriptlet into Jstl tags. Any help would be appreciated.



Also, is there any easy way to send two lists of type List<CssValList> from a controller to the jsp? I tried to put these two lists into another list of the same type and then send that list to the Jsp.

Thanks,
Shiny.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure exactly what you are asking.

Any list should be created in the controller. The JSP is not the place to be creating data; just displaying it.

If you have two lists, simply put them into request scope with different names.
 
Shiny Suresh
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried setting both the lists in 2 request.setattribute. But I got error in the second setattribute. Is it possible to do more than one setattribute from the same controller method? Thank you so much for your prompt response.

Shiny.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can set as many scoped variables (what you are calling an "attribute") as you like.
 
Shiny Suresh
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your prompt response. It worked!!! Thank you.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!