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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10896

Parsing ContentType error

           Summary: Parsing ContentType error
           Product: Tomcat 4
           Version: 4.1.7
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Jasper 2
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


//org.apache.jasper.compiler.ParserController
//
    private void figureOutJspDocument(String file,
                                      String encoding,
                                      InputStreamReader reader)
        throws JasperException
    {
        JspReader jspReader;
        try {
            jspReader = new JspReader(ctxt, file, encoding, reader,
                compiler.getErrorDispatcher());
        }
        catch (FileNotFoundException ex) {
            throw new JasperException(ex);
        }
        jspReader.setSingleFile(true);
        Mark startMark = jspReader.mark();

        // Check for the jsp:root tag
        // No check for xml prolog, since nothing prevents a page
        // to output XML and still use JSP syntax.
        jspReader.reset(startMark);
        Mark mark = jspReader.skipUntil(JSP_ROOT_TAG);
        if (mark != null) {
            isXml = true;
        }
        else {
            isXml = false;
        }

        newEncoding = null;

        // Figure out the encoding of the page
        // FIXME: We assume xml parser will take care of
        // encoding for page in XML syntax. Correct?
        if (!isXml) {
            jspReader.reset(startMark);
            while (jspReader.skipUntil("<%@") != null) {
                jspReader.skipSpaces();
                if (jspReader.matches("page")) {
//Bug: The next line is no use.
//                  jspReader.advance(4);

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

Reply via email to