Introduction: The JSTL Challenge in JSP Development

When developing JavaServer Pages (JSP), many developers face issues related to the JSTL (JavaServer Pages Standard Tag Library) URI references. If you’ve encountered the error message “According to TLD or attribute directive in tag file, attribute key does not accept any expressions”, you’re not alone. This blog post aims to address your confusion regarding the proper JSTL URLs to use in your JSP files, especially when working with specific versions of Tomcat, such as Tomcat 6.0.18.

Understanding the Problem

You may be trying to switch the JSTL jar file that contains the TLD (Tag Library Descriptor) files directly in your project, rather than deploying them separately. This leads to questions about which JSTL URL to reference and which version of JSTL you are using. Here’s a breakdown of the key issues:

  • JSTL Versions: Compatibility of different JSTL versions with JSTL URLs.
  • Errors in JSP: Specific error messages indicating misconfigurations in taglib references.
  • Tag Library Deployment: Switching to a jar file for simplification of your JSTL usage.

The Solution: Correct JSTL URL References

To resolve the misunderstandings, here is the solution you need:

Correct URI for JSTL Core

The following reference should be consistently used in your JSP files:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

Additional Information

  • Version: This reference is standard for a majority of JSTL implementations, particularly when using Tomcat 6.0.18. It allows the JSP to recognize and use the JSTL core tags effectively.
  • Further Reading: For more insights and community discussions surrounding JSTL tag library definitions, you can check out this link.

Conclusion: Ensuring a Smooth Development Process

By utilizing the correct JSTL URI in your JSP files, you can avoid the frustrating errors and streamline your web application’s configuration. Remember, setting the right path not only helps to understand your existing code better but also enhances the debugging process. Make sure to check the JSTL library version you are using and adjust the URIs correspondingly if you’re working with different versions in the future.


Embrace the power of JSTL in your JSP development, and eliminate those pesky errors once and for all!