Tomcat 5.5 não interpreta EL

4 respostas
Diego.G.A
Eu montei um script que utiliza a EL e o mesmo será rodado em um tomcat 5.5, mas o servidor não consegue interpretar as minhas expressões.
<%-- 
    Document   : listagem
    Created on : 13/05/2009, 09:58:13
    Author     : diego
--%>

<%@page contentType="text/html" pageEncoding="ISO-8859-1"%>
<%@page import="java.util.List" %>
<%@page import="java.util.Iterator" %>
<%@page import="pa.prodepa.sincronismo.vo.TabelaVO"%>
<%@page import="pa.prodepa.sincronismo.action.ListagemAction"%>
<%@taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%
ListagemAction lAction = new ListagemAction();
request.setAttribute("lista", lAction.lista(request.getParameter("key")));
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <title>JSP Page</title>
        <style type="text/css" media="all">
          @import url("css/maven-base.css"); @import url("css/maven-theme.css"); @import url("css/site.css"); @import
          url("css/screen.css");
        </style>
        <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
        <style type="text/css">
            body {
                font-family: Arial;
                font-size: 11px;
                margin: 3px;
            }
            /*#listagemDados {
                width: 100%;
                padding: 1px;
                border: black solid 1px;
            }
            #listagemDados th {
                background: #D4D0C8;
                height: 20px;
                padding-top: 5px;
            }*/
            .codSub {
                text-align: center;
            }
            .elemento {
                padding-left: 4px;
            }
            a {
                color: black;
                text-decoration: underline;
            }
            #topo {
                margin: 10px;
            }
            #topo {
                margin: 10px;
                width: 100%;
            }
            #div-button {
                margin: 0;
                font-size: 80% /*smaller*/;
                font-weight: bold;
                line-height: 1.1;
                text-align: center;
                position: fixed;
                top: 2em;
                left: auto;
                width: 8.5em;
                right: 2em;
                float: right;
            }
            #h4-msg {
                color: #F00;
            }
        </style>
        <script src="js/jquery-1.3.2.min.js"></script>
        <script src="js/actions.js"></script>
    </head>
    <body>
        <input type="hidden" id="idUsuario" name="idUsuario" value="<%=request.getParameter("key")%>">
		<div id="topo">
			<div id="msg-status" style="float:left;width:300px;"></div>
			<div id="div-button"><input type="button" value="Fechar" onclick="fechar()"></div>
			<dir style="clear:both;"></dir>
		</div>
        <h3>Marque em "Exibe" as despesas que ser&atilde;o exibidas na lista</h3>
        <h4 id="h4-msg"><strong>Utilize o bot&atilde;o FECHAR para atualizar a p&aacute;gina.</strong></h4>
        <display:table name="lista" id="elemento" htmlId="listagemDados"
            export="true" pagesize="20">
            <display:column title="Exibe" class="codSub">
                <input name="dado_${elemento.cod_SubElem_Desp}"
                    type="checkbox" id="dado_${elemento.cod_SubElem_Desp}"
                    ${elemento.checked} value="${elemento.cod_SubElem_Desp};${elemento.elemento_Despesa};${elemento.sub_Elemento_Despesa};${elemento.id}" onclick="${elemento.funcao}">
            </display:column>
            <display:column title="ID Sub-Elemento Despesa" property="cod_SubElem_Desp" class="codSub" sortable="true"/>
            <display:column title="Nome Elemento Despesa" property="elemento_Despesa" class="elemento" sortable="true" />
            <display:column title="Nome Sub-Elemento Despesa" property="sub_Elemento_Despesa" class="elemento" sortable="true" />
        </display:table>
    </body>
</html>

4 Respostas

Metaleiro

[color=darkblue] Não sei se ajuda : [/color]

EL não funciona

Diego.G.A

saca só o EL não funciona no tomcat 5.5?

J

Cara posta o conteúdo do seu web.xml, eu já tive um problema assim, antes meu web.xml era assim:

<?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>
  <display-name>Archetype Created Web Application</display-name>
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <servlet>
        <servlet-name>dispatcher</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>dispatcher</servlet-name>
        <url-pattern>*.htm</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>redirect.jsp</welcome-file>
        </welcome-file-list>
    </web-app>

ai alterei o cabeçalho e passei para:

<?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
        version="2.4"
        xmlns="http://java.sun.com/xml/ns/j2ee"
        id="WebApp_ID"
        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>Archetype Created Web Application</display-name>
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>

    <filter>
        <filter-name>AcegiFilterChainProxy</filter-name>
        <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
        <init-param>
            <param-name>targetClass</param-name>
            <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
        </init-param>
    </filter>
    <filter-mapping>
      <filter-name>AcegiFilterChainProxy</filter-name>
      <url-pattern>/*</url-pattern>
    </filter-mapping>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <servlet>
        <servlet-name>dispatcher</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>dispatcher</servlet-name>
        <url-pattern>*.htm</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
</web-app>

e tudo funcionou :slight_smile:

Diego.G.A

valeu joaodavidsr funcionou aqui.

Criado 18 de maio de 2009
Ultima resposta 20 de mai. de 2009
Respostas 4
Participantes 3