This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes problem with EL in my JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem with EL in my JSP page" Watch "problem with EL in my JSP page" New topic
Author

problem with EL in my JSP page

sammeta Phanikumar
Ranch Hand

Joined: Oct 25, 2007
Posts: 81
Hi,

Could any one help me.

${2+5}
${param.name}

These lines are printing as it is in response page.

What is the problem, Im using jsp 2.0 only..
Should I set any path to use EL in jsp.


SCJP 5, SCWCD 5, SCDJWS 5
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

Refer to the JSP FAQ. It explains how to make sure that you are set up correctly for the JSTL and EL.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Specifically, look for the correct web.xml heading for your version.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
sammeta Phanikumar
Ranch Hand

Joined: Oct 25, 2007
Posts: 81
Thnaks for your response,
I got and copied the following even though it is not.

<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
</web-app>

Please help me...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

DId you restart the web app?
sammeta Phanikumar
Ranch Hand

Joined: Oct 25, 2007
Posts: 81
Yes I did.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

What version of Tomcat are you using?
sammeta Phanikumar
Ranch Hand

Joined: Oct 25, 2007
Posts: 81
Tomcat 5.5 and java is of 1.5.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

And you are accessing a *.jsp file, aren't you ?


[My Blog]
All roads lead to JavaRanch
sammeta Phanikumar
Ranch Hand

Joined: Oct 25, 2007
Posts: 81
Yes I am.
Marimuthu Madasamy
Ranch Hand

Joined: Jun 07, 2007
Posts: 72

just to check,

try setting the isELIgnored attribute of page directive to false in JSP,



- Marimuthu Madasamy
sammeta Phanikumar
Ranch Hand

Joined: Oct 25, 2007
Posts: 81
Thanks Marimutu,

I wondered, why should we specify isELIgnored="false".

Does not EL is enabled by default?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

The EL should be enabled by default if your web.xml is properly declared. Does adding isELignored makes things work?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: problem with EL in my JSP page