Hello Christopher Schultz, 

Sorry for the delayed reply.

> On 11/7/14 2:51 PM, Stephen McCants wrote:
> > I'm seeing a strange problem where isELIgnored has the wrong
> > default value for a new Tomcat install of 5.0.56.
> 
> That version number is certainly wrong.
> Highest 5.0 version is 5.0.30
> Highest 5.5 version is 5.5.36
> 
> Hopefully, you meant Tomcat 7.0.56 which is the most current release
> of Tomcat 7.0.

Sorry, typo.  7.0.56 is correct.

> 
> > I'm moving a Web Application on Windows 7 to Windows 2008 and that 
> > caused the EL expressions to stop being evaluated on the new
> > install..
> > 
> > Problem is only seen on Windows Server 2008 with Tomcat 7.0.56,
> > while it works correctly on Tomcat 7.0.37 (Windows 7) and 7.0.42
> > (Linux).  The web application is the same on all three servers.
> > 
> > Our web.xml file specifies:
> > 
> > <web-app xmlns="http://java.sun.com/xml/ns/javaee"; 
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; version="2.5">
> > 
> > So, I believe the correct behavior with 2.5 is that EL expressions 
> > should be evaluated.
> 
> Note that the various EGs have made it clear that in many cases, your
> descriptor's version number is irrelevant: the server will provide the
> behavior of the most-recent version of the spec that the server
> supports. (The Servlet EG and I differ on whether this is appropriate.)

Interesting and good to know.

> 
> > I worked around the problem by adding the following to the JSP
> > files:
> > 
> > <%@ page isELIgnored="false" %>
> > 
> > However, I'd like to understand where the configuration error is 
> > occurring as from my perspective nothing changed except OS and
> > Tomcat version.  My own efforts have turned up nothing helpful or 
> > illuminating.
> > 
> > Where should I be looking in the configurations for a difference?
> > What differences would come into play?
> 
> What is your tag library declaration in your JSP file? That's probably
> the most important thing, here. 

Here is the top of the header.jsp file that is included by most (all?) of our 
JSP pages:

<!-- Header shared by a number of pages -->
<%@ page import="com.hcs.webtl.servlet.ScheduleBase" %>
<%@ page import="com.hcs.webtl.util.CookieUtil" %>
<%@ page import="com.hcs.webtl.util.WTLUtilities" %>
<%@ page import="com.hcs.webtl.shiro.util.WebTimelineShiroUtilities" %>
<%@ page import="com.hcs.webtl.filter.LegacyFilter" %>
<%@ page import="com.hcs.data.dao.util.SiteAndFacility" %>
<%@ page import="com.hcs.data.dao.util.DAOUtils" %>
<%@ page import="com.hcs.data.dao.beans.Hostmap" %>
<%@ page import="com.hcs.util.OAUtilities" %>
<%@ page import="java.util.List" %>
<%@ page isELIgnored="false" %> <%-- This fixes misbehaving versions of Tomcat 
that like to turn of EL (Expression Evaluation) --%>
<%--<%@ taglib prefix="shiro" uri="/WEB-INF/lib/shiro-web-1.2.2.jar" %>--%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"; %>
<%--<%@ taglib prefix="shiro" 
uri="/WEB-INF/lib/shiro-web-1.2.2.jar/META-INF/shiro.tld" %>--%>
<%@ taglib prefix="sfp" uri="/WEB-INF/SiteFacilityPermission.tld"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"; prefix="fn" %>

Obviously, I've already added the isELIgnored option to work around the problem 
for the time being.  A sample page that includes this starts with:

<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"; %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"; prefix="fn" %>
<%@ page import="com.hcs.data.dao.beans.Hostmap" %>
<%@ page import="com.hcs.data.dao.util.DAOUtils" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
    <c:set  var="j_username" value="${param.j_username}" />
    <shiro:user>
        <meta http-equiv="refresh" content="0;URL='/redirect'" />
    </shiro:user>
    <shiro:guest>
        <head>
            <title>Login</title>
            <script src="lib/jquery-1.7.2.min.js"></script> <!-- Need JQuery to 
let us manipulate some text. -->
            <link rel="stylesheet" type="text/css" href="style/header.css"/>
                <meta name="viewport" id="iphone-viewport" content="width=380" 
/>
        </head>
        <body>
        <%@ include file="header.jsp" %>
.....

I'm assuming including taglib tags inside the <body> is fine, since that is JSP 
vs. HTML.

> Are you supplying your own version of
> JSTL, EL, etc. along with your web application?

In the tomcat/lib directory, we've linked in (common to our Web Applications):

encorder-1.1.jar
jcl-over-slf4j-1.7.5.jar
jstl-1.2.jar
jul-to-slf4j-1.7.5.jar
log4j-over-slf4j-1.7.5.jar
logback-access-1.0.13.jar
logback-classic-1.0.13.jar
logback-core-1.0.13.jar
mail.jar
mysql-connector-java-5.1.21-bin.jar

Inside our Web App WEB-INF/lib we provide so of our own libraries and:

tomcat-jdbc.jar
tomcat-juli.jar
shiro-*-1.2.2.jar
org.json.jar
org.restlet.*.jar
commons-beanutils-1.8.3.jar
commons-collections-3.1.jar

I don't believe we've introduced any conflicts, but I could be missing 
somethings.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to