Re: 4.1.10 Tag Bug

2002-09-09 Thread Jan Luehe

Ralph,

 I think there is a serious bug in the jsp compiler from tomcat 4.1.10.
 The compiler creates wrong code for nested variables. Here an example
 that works with 4.1.9 and does not with 4.1.10

this is now fixed.


Jan


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: 4.1.10 Tag Bug

2002-09-09 Thread Milt Epstein

On Mon, 9 Sep 2002, Jan Luehe wrote:

 Ralph,

  I think there is a serious bug in the jsp compiler from tomcat 4.1.10.
  The compiler creates wrong code for nested variables. Here an example
  that works with 4.1.9 and does not with 4.1.10

 this is now fixed.

What version/realease/nightly build is it fixed in?

Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: 4.1.10 Tag Bug

2002-09-09 Thread Remy Maucherat

Milt Epstein wrote:
 On Mon, 9 Sep 2002, Jan Luehe wrote:
 
 
Ralph,


I think there is a serious bug in the jsp compiler from tomcat 4.1.10.
The compiler creates wrong code for nested variables. Here an example
that works with 4.1.9 and does not with 4.1.10

this is now fixed.
 
 
 What version/realease/nightly build is it fixed in?

The fix will be in 4.1.11, along with the workaround for the problem 
when running TC on Windows.
As for the tag date, I'd say next week, so that we get a chance to fix 
most of the bugs the release uncovered.

A workaround for all these problems is to use Jasper 1 with 4.1.10, as 
mentioned in the release notes.

Remy


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: 4.1.10 Tag Bug

2002-09-09 Thread Jan Luehe

Milt,

  Ralph,
 
   I think there is a serious bug in the jsp compiler from tomcat 4.1.10.
   The compiler creates wrong code for nested variables. Here an example
   that works with 4.1.9 and does not with 4.1.10
 
  this is now fixed.
 
 What version/realease/nightly build is it fixed in?

I committed the fix to the tomcat_4_branch and Tomcat 5 head branch
this morning.


Jan


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: 4.1.10 Tag Bug

2002-09-09 Thread Milt Epstein

On Mon, 9 Sep 2002, Jan Luehe wrote:

 Milt,

   Ralph,
  
I think there is a serious bug in the jsp compiler from tomcat 4.1.10.
The compiler creates wrong code for nested variables. Here an example
that works with 4.1.9 and does not with 4.1.10
  
   this is now fixed.
 
  What version/realease/nightly build is it fixed in?

 I committed the fix to the tomcat_4_branch and Tomcat 5 head branch
 this morning.

Thanks for the info.

So what's the status of 4.1.10 vis-a-vis this bug?  I don't have a
particular interest in this bug, but I saw that 4.1.10
is a Release build, so I was wondering about this.

Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: 4.1.10 Tag Bug

2002-09-09 Thread Amy Roh

Milt Epstein wrote:
 On Mon, 9 Sep 2002, Jan Luehe wrote:
 
 
Milt,


Ralph,


I think there is a serious bug in the jsp compiler from tomcat 4.1.10.
The compiler creates wrong code for nested variables. Here an example
that works with 4.1.9 and does not with 4.1.10

this is now fixed.

What version/realease/nightly build is it fixed in?

I committed the fix to the tomcat_4_branch and Tomcat 5 head branch
this morning.
 
 
 Thanks for the info.
 
 So what's the status of 4.1.10 vis-a-vis this bug?  I don't have a
 particular interest in this bug, but I saw that 4.1.10
 is a Release build, so I was wondering about this.

The fix will be in the next release 4.1.11 since it's fixed after 4.1.10 
release.

Amy

 
 Milt Epstein
 Research Programmer
 Integration and Software Engineering (ISE)
 Campus Information Technologies and Educational Services (CITES)
 University of Illinois at Urbana-Champaign (UIUC)
 [EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




4.1.10 Tag Bug

2002-09-06 Thread Ralph Schaer

Hello

I think there is a serious bug in the jsp compiler from tomcat 4.1.10.
The compiler creates wrong code for nested variables. Here an example
that works with 4.1.9 and does not with 4.1.10


JSP
---

%@ taglib uri=/misc  prefix=misc %
htmlheadtitleTitle/title/headbody
misc:test id=t
%= t %
/misc:test
/body/html


TLD
---
  tag
nametest/name
tag-classTestTag/tag-class
body-contentJSP/body-content
variable
  name-from-attributeid/name-from-attribute
  variable-classjava.lang.String/variable-class
  declaretrue/declare
  scopeNESTED/scope
/variable
attribute
  nameid/name
  requiredtrue/required
  rtexprvaluetrue/rtexprvalue
/attribute
  /tag   

CODE


public class TestTag extends TagSupport {

  private String id;
  public TestTag() {
init();
  }
  public String getId() {
return id;
  }
  public void setId(String id) {
this.id = id;
  }
  public void release() {
super.release();
init();
  }
  private void init() {
id = null;
  }
  public int doStartTag() throws JspException {
pageContext.setAttribute(getId(), a short test string, PageContext.PAGE_SCOPE); 
return (EVAL_BODY_INCLUDE);
  }


Compiled JSP

Here you can see what's wrong. The assignment for t is on the wrong
position

   if (_jspx_eval_misc_test_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
===java.lang.String t = null;
do {
  out.write(\r\n);
===  out.print( t );
  out.write(\r\n);
  int evalDoAfterBody = _jspx_th_misc_test_0.doAfterBody();
===  t = (java.lang.String) pageContext.findAttribute(t);
  if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
  }


  
Regards
Ralph


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: 4.1.10 Tag Bug

2002-09-06 Thread Jan Luehe

Ralph,

 I think there is a serious bug in the jsp compiler from tomcat 4.1.10.
 The compiler creates wrong code for nested variables. Here an example
 that works with 4.1.9 and does not with 4.1.10

OK, I really think the spec needs to be clarified in this respect.

JSP.10.5.9 (VariableInfo) of the JSP 1.2 spec has this:

  The scope value for a variable implies what methods may affect its
  value and thus where synchronization is needed:

  - for NESTED, after doInitBody and doAfterBody for a tag handler
implementing BodyTag, and after doStartTag otherwise.

  - [...]

This does not special-case tag handlers implementing IterationTag
(which is implemented by TagSupport), which, according to
JSP.10.1.2.4, are supposed to have their scripting variables
synchronized after the call to doAfterBody(), and therefore Jasper was
missing this synchronization step for tag handlers implementing IterationTag.
This issue had been filed as Bugzilla Bug 11552 (Iteration tags do
not resynchronize scripting variables after doAfterBody()) and was
fixed, but as part of the fix I also removed synchronization of
NESTED variables after doStartTag() for tag handlers implementing
IterationTag.

So what the spec really should say is the following:

  - for NESTED, after doInitBody and doAfterBody for a tag handler
implementing BodyTag,
after doStartTag and doAfterBody for a tag handler implementing
IterationTag, and after doStartTag otherwise.

Does this make sense? If so, I'll add the synchronization of NESTED
variables after doStartTag for tag handlers implementing IterationTag.


Jan



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]