He intentado durante más tiempo del que me gustaría admitir para que JSTL funcione bajo Eclipse (y finalmente bajo GAE/J). He descargado Eclipse, la extensión de Google App Engine para Eclipse, y JSTL (http://download.java.net/maven/1/jstl/jars/ - jstl-1.2.jar está en el directorio WEB-INF \ lib).¿Qué archivos JAR se necesitan para que Eclipse utilice JSTL para que finalmente funcione en GAE/J?
Mi código es a continuación junto con la salida:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<HTML><HEAD><TITLE>Test Page</TITLE></HEAD><BODY>
Test Page
<c:set var="myvar" value="3"/>
</BODY></HTML>
El error que consigo es:
The tag handler class for "c:set" (org.apache.taglibs.standard.tag.rt.core.SetTag) was not found on the Java Build Path
test.jsp
[my app's path and name]
line 8
JSP Problem
Desde el último mensaje en esta página no creo que necesito un estándar. jar (http://forums.sun.com/thread.jspa?threadID=701267) y, en cualquier caso, no pude encontrar uno en el sitio de descarga de Oracle.java.com junto con el jstl jar.
EDITAR 4: funciona ahora - Pasos:
1) el uso de la versión de Apache
2) En realidad incluir el archivo jar en la trayectoria de la estructura (clic derecho en el proyecto Eclipse y golpeó Propiedades - Path> Java Build -> Bibliotecas -> Agregar clase carpeta ...; la guerra/WEB-INF/lib no es al parecer en la trayectoria de la estructura por defecto)
3) Agregar el archivo a c.tld/WEB-INF/TLD guerra
Hacer su web.xml se parece a:
<\?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" 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">
<display-name>JSTLExample</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>
</jsp-config>
</web-app>
La prueba jsp contenido del archivo:
<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!-- Taglib -->
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Test Apache ServiceMix with JSTL</title>
</head>
<body>
This is a testpage.
<%= "hello" %>
<c:forEach var="i" begin="1" end="10" step="1">
<c:out value="${i}" />
<br />
</c:forEach>
</body>
</html>
Eso es trange: tengo el mismo problema con jstl.jar y si lo he descargado desde donde dices que funcionó. –