Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

NoClassDefFoundError with c:set using body content

 
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!
 
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
 
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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • 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 ]
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic