DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28534>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28534

generated code for tag file directives fails compilation with "';' expected"

           Summary: generated code for tag file directives fails compilation
                    with "';' expected"
           Product: Tomcat 5
           Version: 5.0.19
          Platform: All
        OS/Version: Windows 9x
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Jasper
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


There is a missing semi-column in code generated for jsp tag files. This makes
that compilation fails with the message, e.g., 

Unable to compile class for JSP  An error occurred at line: 1 in the jsp file:
/WEB-INF/tags/be/peopleware/petrobel/web/jsp/tags/logControl.tag  Generated
servlet error:  [javac] Compiling 1 source file 
/Library/Tomcat/jakarta-tomcat-5.0.16/work/Catalina/localhost/Petrobel/org/apache/jsp/tag/web/be/peopleware/petrobel/web/jsp/tags/logControl_tag.java:42:
';' expected  tag body-content="empty" ^ 1 error

Try a simple tag file like this:

---------------------
<% tag body-content="empty" %>

<p>HELLO</p>
---------------------


The generated code is this:

---------------------
package org.apache.jsp.tag.web.be.peopleware.petrobel.web.jsp.tags;

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

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


  private static java.util.Vector _jspx_dependants;

  private JspContext jspContext;
  private java.io.Writer _jspx_sout;
  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;
  }

  public java.util.List getDependants() {
    return _jspx_dependants;
  }

  public void doTag() throws JspException, java.io.IOException {
    PageContext _jspx_page_context = (PageContext)jspContext;
    HttpServletRequest request = (HttpServletRequest)
_jspx_page_context.getRequest();
    HttpServletResponse response = (HttpServletResponse)
_jspx_page_context.getResponse();
    HttpSession session = _jspx_page_context.getSession();
    ServletContext application = _jspx_page_context.getServletContext();
    ServletConfig config = _jspx_page_context.getServletConfig();
    JspWriter out = jspContext.getOut();

    try {
 tag body-content="empty"                  <<<<<<<<<<<< ERROR HERE <<<<<<<<<
      out.write("\n");
      out.write("\n");
      out.write("<p>HELLO</p>\n");
    } catch( Throwable t ) {
      if( t instanceof SkipPageException )
          throw (SkipPageException) t;
      if( t instanceof java.io.IOException )
          throw (java.io.IOException) t;
      if( t instanceof IllegalStateException )
          throw (IllegalStateException) t;
      if( t instanceof JspException )
          throw (JspException) t;
      throw new JspException(t);
    } finally {
      ((org.apache.jasper.runtime.JspContextWrapper) jspContext).syncEndTagFile();
    }
  }
}
---------------------

Obviously, there is a ";" missing there.

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

Reply via email to