• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

assign expression language value to a string

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to assign the retrieved EL value to a string , but it doesnot worked.



please help me with correct code.


 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tushar,

Can you please try below code.



 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The EL was meant to replace scriptlets in a JSP, not work in conjunction.

You should choose to either use scriptlets, or to use the EL. Using both is just a mess.
 
tushar panda
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:You should choose to either use scriptlets, or to use the EL. Using both is just a mess.



Dear sir ,
i know its a mess but i require it for comparision , as newbie to EL , don't know how to compare using EL.
 
tushar panda
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@ ujjwal soni

tried your code and got the error below :


is anything required to be changed in web.xml ??
 
Bear Bibeault
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

tushar panda wrote:i know its a mess but i require it for comparision


Hogwash. Scriptlets aren't required to do anything with the EL. If are trying to learn the EL, learn it right. That means no scriptlets.

So what are you really trying to do?
 
ujjwal soni
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yea, check your web.xml for below entries ?

If they dont exist or they differ, put those in.



Also, which tld ru using, is it c.tld or some other one for core libs, of its other then put that name in.
 
Bear Bibeault
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ujjwal soni wrote:If they dont exist or they differ, put those in.


NO!
Do not add that to your web.xml. Never take the TLDs out of the jar file. Simply put the jstl jar file (or files) in WEB-INF/lib.

Do not, I repeat do not, extract the tld files, nor put any delcarations like this in your web.xml. It's unnecessary and just leads to other problems.

Also, which tld ru using


ujjwal soni, Please use real words when posting to the forums. Abbreviations such as "ru" in place of "are you" only serve to make your posts more difficult to read. Please read this for more information.
 
ujjwal soni
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,

Well i meant by the lines in web.xml not with the tlds.

I will take care from next time that correct words are being used..
 
Bear Bibeault
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ujjwal soni wrote:Well i meant by the lines in web.xml not with the tlds.


That's what I was talking about. The JSTL should not be declared in the web.xml. Nor should the c.tld file be removed from the jar file and placed anywhere within the web app.

The TLD files are already in the JSTL jar files and the container will find them there.
 
ujjwal soni
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, got your point....Thanks....
 
I’m tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic