Re: tag file recursivity problem

2008-01-08 Thread Lucas Galfaso
Hi,
  It should be available in the next Tomcat release (in fact it was
included in a not-released Tomcat 6.0.15)
  No idea when the next GA release be available.

Regards,
  Lucas

On Jan 8, 2008 12:18 PM, Jair da Silva Ferreira Jr [EMAIL PROTECTED] wrote:
 Hi,
 Thank you very much for your reply.
 Is this fix going to be available in the next Tomcat version? Do you
 know when the next version will be released?
 Thank you very much.

 Sincerely,
 Jair Jr

 Lucas Galfaso escreveu:

  Hi,
This is a known issue is Tomcat 6.0.14, it was reported using
  http://issues.apache.org/bugzilla/show_bug.cgi?id=42693 and it is
  fixed in the trunk.
 
  Regards,
lg
 
  On Jan 6, 2008 1:50 PM, Jair da Silva Ferreira Jr [EMAIL PROTECTED] wrote:
 
  Hi,
  I am experiencing a problem with recursivity in tag files in tomcat
  6.0.14. I developed a simple tag file to show you the problem.
  Here is my tag file:
 
  %@ tag body-content=empty %
  %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c%
  %@ taglib prefix=t tagdir=/WEB-INF/tags %
 
  %@ attribute name=number required=true type=java.lang.Integer %
  c:choose
  c:when test=${number==0 || number==1}1/c:when
  c:otherwise${number}*t:factorial 
  number=${number-1}//c:otherwise
  /c:choose
 
  The tag file is pretty simple. When called from a jsp file, the tag
  outputs how the factorial of any given number is calculated, but it
  doen't actually calculate the factorial result. For example: if the
  number paramenter is 5, the tag will output 5*4*3*2*1.
  Here is the portion of the jsp file that calls the tag:
  c:if test=${! empty param.number}
  Result: t:factorial number=${param.number}/
   /c:if
 
  The problem is that nothing is displayed when the tag is called form
  a jsp file. It happens as if the tag is not being called at all or as if
  it is an empty tag file.
  After some work I found out the problem. Jasper is not correctly
  converting my recursive tag file to java code. The resulting java file
  found in tomcat's work directory has an empty doTag method. Here is the
  doTag method:
  public void doTag() throws JspException, java.io.IOException {
  }
 
  I've checked all tomcat logs and couldn't find any jasper error 
  message.
  I've run the same web application in two different systems and the
  problem only happens in system 2. Here is the configuration:
 
  System 1 (development machine) (problem does not happen):
  - OS: Windows XP sp2
  - Hardware: AMD Athlon XP 2400+ (2.03 GHz) (1,5 GB RAM)
  - Java (as stated by java -version command):
   java version 1.6.0_03
  Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
  Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode,
  sharing)
  - Tomcat version: 6.0.14 (.zip download package)
  System 2 (production machine) (problem happens):
   - OS: Ubuntu linux 7.10 (codename gutsy)
   - Hardware: HP Tower Computer ProLiant ML350 G5, Intel(R)
  Xeon(R) CPU 5120 @ 1.86GHz, 4 GB RAM
   - Java (as stated by java -version command):
java version 1.6.0_03
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)
   - Tomcat version: 6.0.14 (.tar.gz download package)
 
  I am sending you my factorial example web application. The file is
  recursive-tag.war. The application only has 2 files: index.jsp and
  factorial.tag.
  I am also sending you 2 jasper generated .java files extracted from
  the tomcat work directory. system1_factorial_tag.java is generated in
  the system 1 configuration and system2_factorial_tag.java is generated
  in the system 2 configuration. Please, notice that the doTag method is
  empty in system2_factorial_tag.java.
  Please, can anyone help me with this problem? Am I doing something
  wrong?
  Thank you very much.
 
  Sincerely,
  Jair Jr
 
  package org.apache.jsp.tag.web;
 
  import javax.servlet.*;
  import javax.servlet.http.*;
  import javax.servlet.jsp.*;
 
  public final class factorial_tag
  extends javax.servlet.jsp.tagext.SimpleTagSupport
  implements org.apache.jasper.runtime.JspSourceDependent {
 
 
private static final JspFactory _jspxFactory = 
  JspFactory.getDefaultFactory();
 
private static java.util.List _jspx_dependants;
 
private JspContext jspContext;
private java.io.Writer _jspx_sout;
private org.apache.jasper.runtime.TagHandlerPool 
  _005fjspx_005ftagPool_005fc_005fchoose;
private org.apache.jasper.runtime.TagHandlerPool 
  _005fjspx_005ftagPool_005fc_005fwhen_005ftest;
private org.apache.jasper.runtime.TagHandlerPool 
  _005fjspx_005ftagPool_005fc_005fotherwise;
 
private javax.el.ExpressionFactory _el_expressionfactory;
private org.apache.AnnotationProcessor 

Re: tag file recursivity problem

2008-01-06 Thread Lucas Galfaso
Hi,
  This is a known issue is Tomcat 6.0.14, it was reported using
http://issues.apache.org/bugzilla/show_bug.cgi?id=42693 and it is
fixed in the trunk.

Regards,
  lg

On Jan 6, 2008 1:50 PM, Jair da Silva Ferreira Jr [EMAIL PROTECTED] wrote:
 Hi,
 I am experiencing a problem with recursivity in tag files in tomcat
 6.0.14. I developed a simple tag file to show you the problem.
 Here is my tag file:

 %@ tag body-content=empty %
 %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c%
 %@ taglib prefix=t tagdir=/WEB-INF/tags %

 %@ attribute name=number required=true type=java.lang.Integer %
 c:choose
 c:when test=${number==0 || number==1}1/c:when
 c:otherwise${number}*t:factorial number=${number-1}//c:otherwise
 /c:choose

 The tag file is pretty simple. When called from a jsp file, the tag
 outputs how the factorial of any given number is calculated, but it
 doen't actually calculate the factorial result. For example: if the
 number paramenter is 5, the tag will output 5*4*3*2*1.
 Here is the portion of the jsp file that calls the tag:
 c:if test=${! empty param.number}
 Result: t:factorial number=${param.number}/
  /c:if

 The problem is that nothing is displayed when the tag is called form
 a jsp file. It happens as if the tag is not being called at all or as if
 it is an empty tag file.
 After some work I found out the problem. Jasper is not correctly
 converting my recursive tag file to java code. The resulting java file
 found in tomcat's work directory has an empty doTag method. Here is the
 doTag method:
 public void doTag() throws JspException, java.io.IOException {
 }

 I've checked all tomcat logs and couldn't find any jasper error message.
 I've run the same web application in two different systems and the
 problem only happens in system 2. Here is the configuration:

 System 1 (development machine) (problem does not happen):
 - OS: Windows XP sp2
 - Hardware: AMD Athlon XP 2400+ (2.03 GHz) (1,5 GB RAM)
 - Java (as stated by java -version command):
  java version 1.6.0_03
 Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
 Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode,
 sharing)
 - Tomcat version: 6.0.14 (.zip download package)
 System 2 (production machine) (problem happens):
  - OS: Ubuntu linux 7.10 (codename gutsy)
  - Hardware: HP Tower Computer ProLiant ML350 G5, Intel(R)
 Xeon(R) CPU 5120 @ 1.86GHz, 4 GB RAM
  - Java (as stated by java -version command):
   java version 1.6.0_03
   Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
   Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)
  - Tomcat version: 6.0.14 (.tar.gz download package)

 I am sending you my factorial example web application. The file is
 recursive-tag.war. The application only has 2 files: index.jsp and
 factorial.tag.
 I am also sending you 2 jasper generated .java files extracted from
 the tomcat work directory. system1_factorial_tag.java is generated in
 the system 1 configuration and system2_factorial_tag.java is generated
 in the system 2 configuration. Please, notice that the doTag method is
 empty in system2_factorial_tag.java.
 Please, can anyone help me with this problem? Am I doing something
 wrong?
 Thank you very much.

 Sincerely,
 Jair Jr

 package org.apache.jsp.tag.web;

 import javax.servlet.*;
 import javax.servlet.http.*;
 import javax.servlet.jsp.*;

 public final class factorial_tag
 extends javax.servlet.jsp.tagext.SimpleTagSupport
 implements org.apache.jasper.runtime.JspSourceDependent {


   private static final JspFactory _jspxFactory = 
 JspFactory.getDefaultFactory();

   private static java.util.List _jspx_dependants;

   private JspContext jspContext;
   private java.io.Writer _jspx_sout;
   private org.apache.jasper.runtime.TagHandlerPool 
 _005fjspx_005ftagPool_005fc_005fchoose;
   private org.apache.jasper.runtime.TagHandlerPool 
 _005fjspx_005ftagPool_005fc_005fwhen_005ftest;
   private org.apache.jasper.runtime.TagHandlerPool 
 _005fjspx_005ftagPool_005fc_005fotherwise;

   private javax.el.ExpressionFactory _el_expressionfactory;
   private org.apache.AnnotationProcessor _jsp_annotationprocessor;

   public void setJspContext(JspContext ctx) {
 super.setJspContext(ctx);
 java.util.ArrayList _jspx_nested = null;
 java.util.ArrayList _jspx_at_begin = null;
 java.util.ArrayList _jspx_at_end = null;
 this.jspContext = new org.apache.jasper.runtime.JspContextWrapper(ctx, 
 _jspx_nested, _jspx_at_begin, _jspx_at_end, null);
   }

   public JspContext getJspContext() {
 return this.jspContext;
   }
   private java.lang.Integer number;

   public java.lang.Integer getNumber() {
 return this.number;
   }

   public void setNumber(java.lang.Integer number) {
 this.number =