Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

<c:out Query

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use <c:out , i have downloaded jstl1.2 jar and placed in my webapp lib folder.
My apache tomact version is 6.0.18, and in my web.xml i have mentioned

><web-app xmlns="http://java.sun.com/xml/ns/javaee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
version="2.5">

But when i am trying to put
<c:out value="<b></b> Bold letters" escapeXML="false"/> in my JSP
I am getting this exception
org.apache.jasper.JasperException: /actionBean.jsp(47,0) Attribute escapeXML invalid for tag out according to TLD


 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try with "escapeXml" instead of "escapeXML".
 
Aditi Kamra
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It worked ...Thanks a lot .. it was a silly mistake from my side..

Also i had another query
Does the default attribute of <c:out works only for String properties of a bean?
what if i wanna print default for an int property in my bean if that property is null...I tried giving default for an int property , but its printing 0.>
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

what if i wanna print default for an int property in my bean if that property is null


You may recall from SCJP that primitives are never null. int variables default to 0.
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic