pacchureddy
asked on
replace/remove the space from variable using jstl's replace function
Hi
I have a variable called"CurrentState" and this is getting displayed in my jsp as:
<c:out value="${currentState}"/>
The posiible values for currentState like: North Carolina , West Virginia ..etc..,
I am trying to get rid of the space inside the variable; like i wanted to get "NortCarolina" instead of "North Carolina"
Here is what I did:
<c:set var="currState" value="${currentState}" />
<c:forEach var="currState" items="${currentState}">
${fn:replace(currState.val
</c:forEach>
<c:out value="${currState}"/>
I think the syntax is somewhat wrong. It doesnt work.. can anyone give me the correct syntax including the tglib uri for this "fn" tag
Thanks
Prashanthi
ASKER
hey
Thanks for responding... I am getting aorg.apache.taglibs.standa rd.lang.js tl.parser. ParseExcep tion: EL functions are not supported.'
Do i need to import a taglib for using "fn" I did tried to downlaod fn.tld ,,but couldnt find it....
Thanks for responding... I am getting aorg.apache.taglibs.standa
Do i need to import a taglib for using "fn" I did tried to downlaod fn.tld ,,but couldnt find it....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I give it.... you are right!!!!
Cheers :-)
fn:replace is normally used inside either a c:out or c:set. a more detailed decription can be found here http://www.onjava.com/pub/a/onjava/2003/11/05/jsp.html?page=2