JSP: Escaping Expression Language (EL)

D

DRS.Usenet

A strange thing happened to on of my apps.

I have this:
<INPUT type="CHECKBOX" name="directory"
value="${piFolder.category}\${piFolder.group}">

I published to one server at one point in time and it the value came
back where both EL expressions were evaluated (for instance
"mycategory\mygroup").

I published to a different server and the value came back for only the
first EL expression (for instance "mycategory${piFolder.group)").

So, it appears that the backslash is being treated as escape character
for EL?

Any ideas for scriptless workarounds?

--Dale--
 
C

Chris Smith

So, it appears that the backslash is being treated as escape character
for EL?

Any ideas for scriptless workarounds?

You could do this:

${firstExpression}${ '\\' }${secondExpression}

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top