Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError with c:set using body content

 
Anupama Ponnapalli
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When I use c:set with the value attribute it works.
<c:set var="firstName" value="Anupama" scope="request"/>

But when I try to use the body content instead of value, I get a NoClassDefFoundError.
<c:set var="lastName" scope="request">Anupama</c:set>



Puzzling! I'm using tomcat 5+ and I have standard.jar and jstl.jar in the WEB-INF/lib.

Clues are very welcome. Thanks!
 
Srinivasan thoyyeti
Ranch Hand
Posts: 558
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might have defined the tag with no body.
Check out with out body
 
Manju Devarla
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how dod i print the value in

<c:set var="name" value="HYd" scope="request"/>

is it like this .. ${name}

but for me

<c:set var="name" scope="request">HYD</c:set> is working fine printing HYD

can anyone clarify this please..

Thanks
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have standard.jar and jstl.jar

Where did you get them ?
 
Anupama Ponnapalli
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Satou,

I got them from a link to apache open source website from the FAQ section on javaranch. "jakarta-taglibs-standard-1.1.2".

I copied the two jars from jakarta-taglibs-standard-1.1.2\lib to my web-apps WEB-INF\lib folder. I ran a check on my jakarta home to check if there could be any other versions in the path - and there aren't.

Thanks,
Anu
 
Anupama Ponnapalli
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manju,

You could you EL, as in ${variableName}. You could use JSTL. eg. <c: out value="varName">

Could I ask you to kindly not make posts that are not related to the original thread? I spend a few minutes using the search facility on this site and it isvery helpful. Maybe you could you try it too. Good luck!

Regards,
Anu
[ March 09, 2007: Message edited by: Anupama Ponnapalli ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic