aspose file tools
The moose likes JSP and the fly likes JSTL and c:set Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "JSTL and c:set" Watch "JSTL and c:set" New topic
Author

JSTL and c:set

Phil Chuang
Ranch Hand

Joined: Feb 15, 2003
Posts: 251
So I got the JSTL prac guide, diving in headfirst and converting my jsp scriptlet heavy code to JSTL ... and I have some questions.
for each page, I declare a String[] like so:

And later on in the code is a method that checks the String[] and compares it against some session values - that's not the part i'm worried about.
My question is, how would I do the above in JSTL, OR how would I do an equivalent with an ArrayList and JSTL?
Phil Chuang
Ranch Hand

Joined: Feb 15, 2003
Posts: 251
Nevermind, it looks like c:set only works with javabeans or Maps
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56157
    
  13

JSTL will work fine with arrays. The difficulties you are having probably stem from the fact that JSTL is generally unaware of sctipting elements and focuses primarily on context attributes.
bear
[ October 29, 2003: Message edited by: Bear Bibeault ]

[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Phil Chuang
Ranch Hand

Joined: Feb 15, 2003
Posts: 251
so what then would be the proper syntax for adding an item to an ArrayList with c:set?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JSTL and c:set
 
Similar Threads
Using JSTL EL in my own custom tags
JSTL way to get a date + 3 months?
JSTL "not registered with the PropertyEditorManager" error
Detecting selected html options using Struts and JSTL?
How to avoid question marks in internationalization using JSTL fmt