aspose file tools*
The moose likes JSP and the fly likes Expression Language is not working in Jsp Tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Expression Language is not working in Jsp Tags" Watch "Expression Language is not working in Jsp Tags" New topic
Author

Expression Language is not working in Jsp Tags

Abhishek Reddy
Ranch Hand

Joined: Mar 28, 2006
Posts: 259
I have a Jsp page and we set the isElIgnored="false" in the page
directtive of the page.
I also have a tag file that we are using. When we run it, the tag file does
not evaluate my el expressions, but prints them as it is. However, this does not happened when i used scriplet expression worked fine.
When I try to include the isElIgnored page directive in the tag file, it
errors out.
1) should I be able to include the isElIgnored page directive in my tag
file, if I have it in my jstl page??
2) If I should not, then how do I get the el evaluator to evaluate my el
expression in side the tag file??

Iam just trying the example in the Head First Servlets and Jsp book.
---------------------------------------------
Here is my JSP code
<%@ page isELIgnored="false"%>
<%@ taglib prefix="myTags" tagdir="/WEB-INF/tags"%>
<html>
<body>
<myTags:header subTitle="${param.name}"/>
</body>
</html>
---------------------------------------------
here is my header.tag file

<%@ attribute name="subTitle" required="true" rtexprvalue="true"%>

<em><strong>${subTitle}</em></strong><br>
<em><strong><%=subTitle%></em></strong><br>
---------------------------------------------
input :
name=abhishek (html)
output:
${subTitle}
abhishek
----------


Abhishek
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

If your web app is set up correctly, and you are using a JSP 2.0 engine, you should never need to use isElIgnored.

Please see the JSP FAQ for info in setting upi your web app correcetly.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Expression Language is not working in Jsp Tags