Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 6.0.0beta14
-
Fix Version/s: None
-
Component/s: JSP
-
Labels:None
-
Environment:Jetty 6 beta 14 Maven Plugin, Windows XP SP2, JDK 1.5_06
-
Number of attachments :
Description
After certain page accesses, EL expressions stop working.
The first time through, expressions are evaluated and output correctly but after a certain page access they will stop working and all bean property accessors stop working until the container is stopped and restarted (an auto-reload is not sufficient). In my own code, I have noticed that sometimes a bean expression with no property accessor is still evaluated correctly but that anything with an accessor is not. The code below does not exhibit that behavior and I cannot recreate it in a simple example.
e.g.
$
${bean.name} does not
This occurs in beta 14 but not beta 12, 11, or 9. And itt appears to be related to using JSP2 tag files as that is the commonality I have found in my own tests.
Here are a page and tag file that demonstrate. Under beta14, these display correctly the first time, but not on subsequent runs. Under beta12, these display fine on every invocation.
----- /bean.jsp ----------------------------------------
<html>
<%@ taglib
prefix="my"
tagdir="/WEB-INF/tags/mytags"%>
<head>
<title>Operate On User</title>
</head>
<body>
<jsp:useBean id="bean" class="java.util.Date"/>
<p>${bean.time}</p>
<p><my:out value="${bean}
" /></p>
</body>
</html>
----- /tags/mytags/out.tag --------------------------
<%@ tag
body-content="empty"
dynamic-attributes="attribs"%>
<%@ attribute
name="value"
required="true"
type="java.lang.Object"%>
$
Can you try with a recent snapshot version of the plugin? There was a bug I found in Jasper (which is the JSP engine that Jetty uses) related to the bean expression language and I fixed it in the Jetty repository. Try it and see if that does the trick.
If not, please post the details of the exception or failure that you get. I tested with your example and could not induce a failure even after many repeated invocations.