Solving “According to TLD or attribute directive in tag file” issue

Yesterday while working on one of the old web application that was created in J2EE / JSP which is using JSTL for painting pages, I encountered a wired issue. As I was using JSTL in my JSPs, I had include required jars like standard.jar and jstl.jar with proper version in classpath of my project. Still I was getting this error whenever I tried running JSP:
According to TLD or attribute directive in tag file, attribute value does not accept any expressions.
After digging into the issue and searching through web, finally I got a workaround to solve this issue. The taglib directive we use to include JSTL core in our JSP needs to be modified. The taglib in my JSP was:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
Code language: HTML, XML (xml)
I changed above to:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
Code language: HTML, XML (xml)
And it worked for me!!! I dig into standard.jar for any clue and also checked few .tld files in this jar but couldn’t find an explanation for this. Any idea why this is so?

View Comments

Recent Posts

  • Java

Java URL Encoder/Decoder Example

Java URL Encoder/Decoder Example - In this tutorial we will see how to URL encode/decode…

4 years ago
  • General

How to Show Multiple Examples in OpenAPI Spec

Show Multiple Examples in OpenAPI - OpenAPI (aka Swagger) Specifications has become a defecto standard…

4 years ago
  • General

How to Run Local WordPress using Docker

Local WordPress using Docker - Running a local WordPress development environment is crucial for testing…

4 years ago
  • Java

Create and Validate JWT Token in Java using JJWT

1. JWT Token Overview JSON Web Token (JWT) is an open standard defines a compact…

4 years ago
  • Spring Boot

Spring Boot GraphQL Subscription Realtime API

GraphQL Subscription provides a great way of building real-time API. In this tutorial we will…

4 years ago
  • Spring Boot

Spring Boot DynamoDB Integration Test using Testcontainers

1. Overview Spring Boot Webflux DynamoDB Integration tests - In this tutorial we will see…

4 years ago