pierred 00/10/27 14:23:37
Modified: jasper/src/share/org/apache/jasper/compiler
JspParseEventListener.java TagLibraryInfoImpl.java
XmlOutputter.java
Added: jasper/src/share/org/apache/jasper/compiler
PageDataImpl.java
Removed: jasper/src/share/org/apache/jasper/compiler
PageInfoImpl.java
Log:
Now compiles with 1.2PFD api.
- PageInfo -> PageData
- new signature for TagLibraryValidator.validate()
Revision Changes Path
1.8 +4 -4
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
Index: JspParseEventListener.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- JspParseEventListener.java 2000/10/23 21:19:56 1.7
+++ JspParseEventListener.java 2000/10/27 21:23:33 1.8
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
1.7 2000/10/23 21:19:56 pierred Exp $
- * $Revision: 1.7 $
- * $Date: 2000/10/23 21:19:56 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
1.8 2000/10/27 21:23:33 pierred Exp $
+ * $Revision: 1.8 $
+ * $Date: 2000/10/27 21:23:33 $
*
* ====================================================================
*
@@ -998,7 +998,7 @@
while (enum.hasMoreElements()) {
TagLibraryInfo tli = (TagLibraryInfo)enum.nextElement();
//@@@ remove cast when TagLibraryInfo is fixed in spec
- String msg = ((TagLibraryInfoImpl)tli).validate(xo.getPageInfo());
+ String msg = ((TagLibraryInfoImpl)tli).validate(xo.getPageData());
if (msg != null) {
throw new JasperException(
Constants.getString(
1.5 +7 -7
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
Index: TagLibraryInfoImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TagLibraryInfoImpl.java 2000/10/05 16:48:01 1.4
+++ TagLibraryInfoImpl.java 2000/10/27 21:23:34 1.5
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
1.4 2000/10/05 16:48:01 pierred Exp $
- * $Revision: 1.4 $
- * $Date: 2000/10/05 16:48:01 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
1.5 2000/10/27 21:23:34 pierred Exp $
+ * $Revision: 1.5 $
+ * $Date: 2000/10/27 21:23:34 $
*
* The Apache Software License, Version 1.1
*
@@ -80,7 +80,7 @@
import javax.servlet.jsp.tagext.TagAttributeInfo;
import javax.servlet.jsp.tagext.TagExtraInfo;
import javax.servlet.jsp.tagext.TagLibraryValidator;
-import javax.servlet.jsp.tagext.PageInfo;
+import javax.servlet.jsp.tagext.PageData;
import org.w3c.dom.*;
import org.xml.sax.*;
@@ -412,7 +412,7 @@
Class tlvClass =
ctxt.getClassLoader().loadClass(validatorclass);
tlv = (TagLibraryValidator) tlvClass.newInstance();
- tlv.setTagLibraryInfo(this);
+ //@@@ removed in 1.2PFD tlv.setTagLibraryInfo(this);
this.tagLibraryValidator = tlv;
} catch (Exception ex) {
Constants.message("jsp.warning.tlvclass.is.null",
@@ -588,10 +588,10 @@
* @param thePage The JSP page object
* @return A string indicating whether the page is valid or not.
*/
- public String validate(PageInfo thePage) {
+ public String validate(PageData thePage) {
TagLibraryValidator tlv = getTagLibraryValidator();
if (tlv == null) return null;
- return tlv.validate(thePage);
+ return tlv.validate(getPrefixString(), getURI(), thePage);
}
protected TagLibraryValidator tagLibraryValidator;
1.4 +7 -7
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java
Index: XmlOutputter.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XmlOutputter.java 2000/10/11 19:35:19 1.3
+++ XmlOutputter.java 2000/10/27 21:23:35 1.4
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
1.3 2000/10/11 19:35:19 shemnon Exp $
- * $Revision: 1.3 $
- * $Date: 2000/10/11 19:35:19 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
1.4 2000/10/27 21:23:35 pierred Exp $
+ * $Revision: 1.4 $
+ * $Date: 2000/10/27 21:23:35 $
*
* ====================================================================
*
@@ -66,7 +66,7 @@
import java.io.InputStream;
import java.io.ByteArrayInputStream;
-import javax.servlet.jsp.tagext.PageInfo;
+import javax.servlet.jsp.tagext.PageData;
import org.xml.sax.Attributes;
import org.xml.sax.helpers.AttributesImpl;
@@ -182,7 +182,7 @@
private static final String PROLOG =
"<!DOCTYPE jsp:root\n PUBLIC \"-//Sun Microsystems Inc.//DTD JavaServer Pages
Version 1.1//EN\"\n \"http://java.sun.com/products/jsp/dtd/jspcore_1_2.dtd\">\n";
- PageInfo getPageInfo() {
+ PageData getPageData() {
StringBuffer buff = new StringBuffer();
buff.append(PROLOG);
@@ -190,7 +190,7 @@
buff.append(sb.toString());
InputStream is =
new ByteArrayInputStream(buff.toString().getBytes());
- PageInfo pageInfo = new PageInfoImpl(is);
- return pageInfo;
+ PageData pageData = new PageDataImpl(is);
+ return pageData;
}
}
1.1
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/PageDataImpl.java
Index: PageDataImpl.java
===================================================================
/*
* $Header:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/PageDataImpl.java,v
1.1 2000/10/27 21:23:34 pierred Exp $
* $Revision: 1.1 $
* $Date: 2000/10/27 21:23:34 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.jasper.compiler;
import java.io.InputStream;
import javax.servlet.jsp.tagext.PageData;
/**
* Implementation of abstract class javax.servlet.jsp.tagext.PageData.
*
* @author Pierre Delisle
*/
public class PageDataImpl extends PageData {
/**
* The XML input stream representing the JSP translation unit.
*/
private InputStream is;
//*********************************************************************
// Constructor
public PageDataImpl(InputStream is) {
this.is = is;
}
//*********************************************************************
// PageData methods
public InputStream getInputStream() {
return is;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]