I’m using tomcat 7.0.26 and indigo eclipse.
I put the jstl jars in my webapp WEB-INF/lib how it’s explained here. I put jstl-api-1.2.jar and jstl-impl-1.2.jar.
In my webapp web.xml, I have:
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
In my .jsp file, I have
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
I have some warnings in my .jsp file on:
<form>
<select id="language" name="language" onchange="submit()">
<option value="en" ${language == 'en' ? 'selected' : ''}>English</option>
<option value="it" ${language == 'it' ? 'selected' : ''}>Italian</option>
</select>
</form>
Precisely:
Multiple annotations found at this line:
- Invalid location of text (''}) in tag
(<option>).
- Invalid location of text (') in tag
(<option>).
- Undefined attribute name (en).
- Undefined attribute name (language).
- Invalid location of text (${) in tag
(<option>).
- Undefined attribute name (:).
- Invalid location of text (' ? ') in tag
(<option>).
In “Console”, this warning appears:
At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
My simple app doen’t succeed in displaying the right labels according to the user language.
Could the option-tag/EL warning depend on jstl file jars?
Try this: