Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
Search Coderanch
Advance search
Google search
Register / Login
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
Tim Cooke
Ron McLeod
paul wheaton
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Himai Minh
Bartenders:
Forum:
JSP
Best usage of chained method calling in JSTL
Joshua Antony
Ranch Hand
Posts: 254
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi All
I have the below code in a
JSP
<%=test.replaceAll("\"",""").replaceAll("'","'").trim()%>')
As part of moving this to JSTL, is there a better apporach than below?
<c:set var="testWithoutQuote" value='${fn:replaceAll(folName,"\"",""")}'/> <c:set var="testWithoutApos" value='${fn:replaceAll(testWithoutQuote,"'","'")}'/> <c:set var="finalTest" value="${fn:trim(testWithoutApos}"/>
SCJP,SCWCD, Into ATG now!
Bear Bibeault
Sheriff
Posts: 67754
173
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You can nest that all in one expression. Rather messy -- I'd be writing a custom EL function to abstract it out.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
using scripting with standard jstl tags
Problem with JSTL c:out tag
How we can write below code in EL or action (to make a scriptless page)
Need help with JSTL: setting end attribute dynamically of "substring" tag
Attribute In Page Scope Doubt !!!
More...