Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JSP Interest »

Re: JSP 2 / fn:replace Question

Dheil Corona

2004-04-13

Replies:

hi

may be you can put the value of your attribute value to a a string variable
first
so you can use the jsp expression (value="<%=yourvar%>")
so there you can escape the quotes in that variable ..

regards
_dheil




----- Original Message -----
From: "Eric Noel" <ericnoel@(protected)>
To: <JSP-INTEREST@(protected)>
Sent: Tuesday, April 13, 2004 2:51 PM
Subject: JSP 2 / fn:replace Question


> I am using tomcat 5.x/jstl 1.1. How do i replace a single quote with
> blank using jstl 1.1, i tried the ff
>
> <c:set var="test" value="${fn:replace(test,''','')}" />
> ${test}
>
> but it errors
>
> org.apache.jasper.JasperException: /test.jsp(12,0)
> "${fn:replace(test,''','')}" contains invalid expression(s):
> javax.servlet.jsp.el.ELException: Encountered "','", expected one of
> [".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=",
> "ne", ")", ",", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&",
> "or", "||", "?"]
>
>
> Thanks for your help.
>
>
===========================================================================
> To unsubscribe: mailto listserv@(protected)
JSP-INTEREST".
> For digest: mailto listserv@(protected)
DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
> http://java.sun.com/products/jsp
> http://archives.java.sun.com/jsp-interest.html
> http://forums.java.sun.com
> http://www.jspinsider.com
>

===========================================================================
To unsubscribe: mailto listserv@(protected)".
For digest: mailto listserv@(protected)".

Some relevant archives, FAQs and Forums on JSPs can be found at:

http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com
©2008 junlu.com - Jax Systems, LLC, U.S.A.