Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Expression Language is not working in Jsp Tags

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
----------
 
Sheriff
Posts: 67641
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
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.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic