Two Laptop Bag*
The moose likes JSP and the fly likes problem in EL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem in EL" Watch "problem in EL" New topic
Author

problem in EL

subodh gupta
Ranch Hand

Joined: Jul 23, 2007
Posts: 203
Hi all,

I am trying to compare the string literal in jsp through EL and jslt core library now:


above expression is evaluating as adjust
.

But


is evaluating as false can you help me.


http://subodh-gupta.blogspot.com
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

You are missing curly brackets :


[My Blog]
All roads lead to JavaRanch
subodh gupta
Ranch Hand

Joined: Jul 23, 2007
Posts: 203
Hi,

I think <c:if> tag doesn't accept the expression with {} but you have to put like this(like given in the 1st post).

If i put a {} in the test attribute, jsp is throwing exception: expression is not allowed in the test attribute.
[ September 17, 2007: Message edited by: subodh gupta ]
Amol Nayak
Ranch Hand

Joined: Oct 26, 2006
Posts: 218
what uri are you using in the taglib directive of the page?
Can you post it?

Also check the tld file, i suspect the rtexprvalue tag is not
present for the attribute or set to false.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

Originally posted by subodh gupta:
jsp is throwing exception: expression is not allowed in the test attribute.
This means that you are using the wrong version of the JSTL for the version of JSP that you are using.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
subodh gupta
Ranch Hand

Joined: Jul 23, 2007
Posts: 203
The exception is:


Url:


The version i am using is jstl-1.0.2.jar.
[ September 17, 2007: Message edited by: subodh gupta ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

Did you read my reply?
subodh gupta
Ranch Hand

Joined: Jul 23, 2007
Posts: 203
What does this mean?

are the jstl and jsp version not compatible?

i am using jstl-1.0.2.jar and <!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

this is my web-inf.xml version i.e. 2.3.

So do you think i should try with 1.1 jslt?
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

you can find the details inside the FAQs Setup Jstl For Jsp2


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in EL
 
Similar Threads
comparing Integer values in JSP
JSTL and scriplets together doesn't work
c:if
JSTL tags
evaluate EL inside EL