Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I do this string concatenation in JSTL?

649509Sep 2 2010 — edited Sep 2 2010
Hi, I'm using Tomcat 6.0.26 with JSTL 1.2.

I'm trying to write a conditional statement, but having trouble figuring out the right syntax. Here is what I have ...
                        <div class="card_holder" style="width:${empty searchResultObjects ? '100%' : fn:length(searchResultObjects)*254 . 'px'};margin-top:37px;">
And here is the error I get ...
Caused by: org.apache.el.parser.ParseException: Encountered " <STRING_LITERAL> "\'px\' "" at line 1, column 77.
Was expecting:
    <IDENTIFIER> ...
Any ideas how to write the above expression properly? THanks, - Dave
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 30 2010
Added on Sep 2 2010
1 comment
1,051 views