Data AccessCore JavaApp FrameworksViewTestingBuildingDeploymentDev ToolsSecurityOpinions

Sunday, December 7, 2008

JSTL Expression Language (EL) not being resolved.

When the container is unable to resolve EL syntax ${}, in JSTL tags. There are a couple of things that you can do to get EL syntax resolving in your JSP's. I assume that you are running an application server supporting the JSP 1.2 and Servlet 2.3 specifications.

In order to evaluate EL expressions, your web.xml file must be up to date.
If your web.xml states that it is version 2.3 or less, EL evaluation is disabled by default for backwards compatibility.

If your web.xml reads:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>

Replace it with:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app 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"
version="2.4">

If you are unable to update your web.xml to a post 2.3 descriptor, then you can add the following to your jsp page to have EL evaluated:
<%@ page isElIgnored="false" %>
overriding the default configuration for a pre 2.4 descriptor.

11 comments:

  1. Thanks a lot. Spend more than a day, breaking my head about what the hell is going on. With 2.4 spec, JSTL works perfectly, even in couple with JSF.

    ReplyDelete
  2. This was worth reading article, java is no doubt the most powerful programming languages yet more demanding as well. <
    Regards,
    PHP Training in Chennai|JAVA Course in Chennai|Best JAVA Training in Chennai|JAVA Training

    ReplyDelete
  3. I have read your blog its very attractive and impressive. I like it your blog.

    Java Training in Chennai Java Training in Chennai | Core Java Training in Chennai

    Online Java Training Java Online Training | Java J2EE Online Training | JavaEE Training Institute in Chennai

    ReplyDelete
  4. Excellent post! Thank you for Sharing. We are the best erp software providers in chennai. For more details call +91 9677025199 or email us on info@bravetechnologies.in
    erp in chennai

    ReplyDelete
  5. Excellent post! I heve read your blog it's very interesting and informative. Keep sharing.
    erp providers in chennai | erp software chennai

    ReplyDelete
  6. your blog was so interesting to read. Really nice thanks for sharing such a great blog, keep updating.. Software Testing Training in Chennai | Selenium Training Institute in Chennai | ALM Training Institute in Chennai

    ReplyDelete
  7. Sas Training Institute in Noida- Webtrackker is the best sas training institute in noida. SAS expansions allow you to build storage networks. SAS architectures support multiple target storage and multiple hosts. In powder architecture, access control techniques are critical. SAN functionality such as zoning is now processed by standard organizations. The zoning will be particularly important for diskless disk environments, each of the blades having its own safe boot disk in an external fence. Future enhancements to SAS are likely to include cryptography and virtualization.SAS focuses on bandwidth, not only through serial architecture, but also by aggregation programs that logically connect multiple connections. This model offers more choices for system OEMs and supplements when power, pin counts, and bandwidth are needed.
    Sap Training Institute in Noida
    PHP Training Institute in Noida
    Hadoop Training Institute in Noida
    Oracle Training Institute in Noida
    Linux Training Institute in Noida
    Dot net Training Institute in Noida
    Salesforce training institute in noida
    Java training institute in noida

    ReplyDelete