cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ImplicitTagLibraryInfo.java

2003-02-13 Thread luehe
luehe   2003/02/13 12:58:42

  Modified:jasper2/src/share/org/apache/jasper/compiler
ImplicitTagLibraryInfo.java
  Log:
  Fixed 17059: o.a.j.compiler.ImplicitTagLibraryInfo doesn't include tag
  files with the extension of .tagx when generating an implicit TLD
  
  Revision  ChangesPath
  1.19  +14 -8 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
  
  Index: ImplicitTagLibraryInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ImplicitTagLibraryInfo.java   18 Dec 2002 23:18:20 -  1.18
  +++ ImplicitTagLibraryInfo.java   13 Feb 2003 20:58:42 -  1.19
  @@ -79,6 +79,7 @@
   
   private static final String WEB_INF_TAGS = /WEB-INF/tags;
   private static final String TAG_FILE_SUFFIX = .tag;
  +private static final String TAGX_FILE_SUFFIX = .tagx;
   private static final String TAGS_SHORTNAME = tags;
   private static final String TLIB_VERSION = 1.0;
   private static final String JSP_VERSION = 2.0;
  @@ -128,13 +129,18 @@
Iterator it = dirList.iterator();
while (it.hasNext()) {
String path = (String) it.next();
  - if (path.endsWith(TAG_FILE_SUFFIX)) {
  - // use the filename of the tag file, without the .tag
  - // extension, as the name subelement of the imaginary
  - // tag-file element
  + if (path.endsWith(TAG_FILE_SUFFIX)
  + || path.endsWith(TAGX_FILE_SUFFIX)) {
  + /*
  +  * Use the filename of the tag file, without the .tag or
  +  * .tagx extension, respectively, as the name subelement
  +  * of the imaginary tag-file element
  +  */
  + String suffix = path.endsWith(TAG_FILE_SUFFIX) ?
  + TAG_FILE_SUFFIX : TAGX_FILE_SUFFIX; 
String tagName = path.substring(path.lastIndexOf(/) + 1);
tagName = tagName.substring(0,
  - tagName.lastIndexOf(TAG_FILE_SUFFIX));
  + tagName.lastIndexOf(suffix));
tagFileMap.put(tagName, path);
}
}
  
  
  

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ImplicitTagLibraryInfo.java

2002-12-14 Thread remm
remm2002/12/14 06:16:07

  Modified:jasper2/src/share/org/apache/jasper/compiler
ImplicitTagLibraryInfo.java
  Log:
  - Fix build.
  
  Revision  ChangesPath
  1.17  +4 -3  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
  
  Index: ImplicitTagLibraryInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ImplicitTagLibraryInfo.java   13 Dec 2002 21:34:56 -  1.16
  +++ ImplicitTagLibraryInfo.java   14 Dec 2002 14:16:07 -  1.17
  @@ -61,6 +61,7 @@
   package org.apache.jasper.compiler;
   
   import java.util.*;
  +import javax.servlet.jsp.tagext.FunctionInfo;
   import javax.servlet.jsp.tagext.TagLibraryInfo;
   import javax.servlet.jsp.tagext.TagInfo;
   import javax.servlet.jsp.tagext.TagFileInfo;
  
  
  

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ImplicitTagLibraryInfo.java

2002-12-13 Thread kinman
kinman  2002/12/13 13:34:56

  Modified:jasper2/src/share/org/apache/jasper/compiler
ImplicitTagLibraryInfo.java
  Log:
  - Patch by Mark Roth
  
  ImplicitTagLibraryInfo incorrectly returned null from getFunctions().
  The spec requires a FunctionInfo[0] instead.  Returning null also caused
  Generator.generateELFunctionMap to throw a NPE in some circumstances.
  
  Revision  ChangesPath
  1.16  +6 -3  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
  
  Index: ImplicitTagLibraryInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ImplicitTagLibraryInfo.java   28 Nov 2002 04:18:08 -  1.15
  +++ ImplicitTagLibraryInfo.java   13 Dec 2002 21:34:56 -  1.16
  @@ -101,6 +101,9 @@
this.tagFileMap = new Hashtable();
this.vec = new Vector();
   
  +// Implicit tag libraries have no functions:
  +this.functions = new FunctionInfo[0];
  +
tlibversion = TLIB_VERSION;
jspversion = JSP_VERSION;
   
  
  
  

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ImplicitTagLibraryInfo.java

2002-10-30 Thread luehe
luehe   2002/10/30 10:06:09

  Modified:jasper2/src/share/org/apache/jasper/compiler
ImplicitTagLibraryInfo.java
  Log:
  Pass null instead of tagdir to TagLibraryInfo constructor.
  
  Revision  ChangesPath
  1.14  +4 -4  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
  
  Index: ImplicitTagLibraryInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ImplicitTagLibraryInfo.java   29 Oct 2002 07:24:41 -  1.13
  +++ ImplicitTagLibraryInfo.java   30 Oct 2002 18:06:09 -  1.14
   -96,7 +96,7 
  String prefix,
  String tagdir,
  ErrorDispatcher err) throws JasperException {
  -super(prefix, tagdir);
  +super(prefix, null);
this.pc = pc;
this.tagFileMap = new Hashtable();
this.vec = new Vector();
  
  
  

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ImplicitTagLibraryInfo.java

2002-10-28 Thread remm
remm2002/10/28 23:24:41

  Modified:jasper2/src/share/org/apache/jasper/compiler
ImplicitTagLibraryInfo.java
  Log:
  - Fix compilation problem.
  
  Revision  ChangesPath
  1.13  +4 -4  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
  
  Index: ImplicitTagLibraryInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ImplicitTagLibraryInfo.java   17 Oct 2002 20:43:06 -  1.12
  +++ ImplicitTagLibraryInfo.java   29 Oct 2002 07:24:41 -  1.13
   -96,7 +96,7 
  String prefix,
  String tagdir,
  ErrorDispatcher err) throws JasperException {
  -super(prefix, null, tagdir);
  +super(prefix, tagdir);
this.pc = pc;
this.tagFileMap = new Hashtable();
this.vec = new Vector();
  
  
  

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ImplicitTagLibraryInfo.java

2002-10-15 Thread luehe

luehe   2002/10/15 17:03:10

  Modified:jasper2/src/share/org/apache/jasper/compiler
ImplicitTagLibraryInfo.java
  Log:
  Fixed call to super() in constructor
  
  Revision  ChangesPath
  1.11  +4 -4  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
  
  Index: ImplicitTagLibraryInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ImplicitTagLibraryInfo.java   13 Sep 2002 18:20:42 -  1.10
  +++ ImplicitTagLibraryInfo.java   16 Oct 2002 00:03:10 -  1.11
  @@ -96,7 +96,7 @@
  String prefix,
  String tagdir,
  ErrorDispatcher err) throws JasperException {
  -super(prefix, tagdir);
  +super(prefix, null, tagdir);
this.pc = pc;
this.tagFileMap = new Hashtable();
this.vec = new Vector();
  
  
  

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ImplicitTagLibraryInfo.java

2002-09-06 Thread luehe

luehe   2002/09/06 12:32:44

  Modified:jasper2/src/share/org/apache/jasper/compiler
ImplicitTagLibraryInfo.java
  Log:
  Rethrow tag file parse exception as RuntimeException in 
ImplicitTagLibraryInfo.getTagFile()
  
  Revision  ChangesPath
  1.9   +4 -4  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
  
  Index: ImplicitTagLibraryInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ImplicitTagLibraryInfo.java   5 Sep 2002 19:05:23 -   1.8
  +++ ImplicitTagLibraryInfo.java   6 Sep 2002 19:32:44 -   1.9
  @@ -159,7 +159,7 @@
tagInfo = TagFileProcessor.parseTagFile(pc, shortName, path,
this);
} catch (JasperException je) {
  - // XXX
  + throw new RuntimeException(je);
}
   
tagFile = new TagFileInfo(shortName, path, tagInfo);
  
  
  

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ImplicitTagLibraryInfo.java

2002-09-05 Thread luehe

luehe   2002/09/05 12:05:23

  Modified:jasper2/src/share/org/apache/jasper/compiler
ImplicitTagLibraryInfo.java
  Log:
  Fixed 12321: StackOverflow Exception when a tag defined by a tag file
   is called within a tag file
  
  Fix includes optimization so that only those tag files that are being
  referenced from the page (via custom actions) are parsed, instead of
  parsing any tag file located at the path specified by the 'tagdir'
  attribute of the taglib directive.
  
  Revision  ChangesPath
  1.8   +46 -10
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
  
  Index: ImplicitTagLibraryInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ImplicitTagLibraryInfo.java   20 Aug 2002 15:50:22 -  1.7
  +++ ImplicitTagLibraryInfo.java   5 Sep 2002 19:05:23 -   1.8
  @@ -82,6 +82,12 @@
   private static final String TLIB_VERSION = 1.0;
   private static final String JSP_VERSION = 2.0;
   
  +// Maps tag names to tag file paths
  +private Hashtable tagFileMap;
  +
  +private ParserController pc;
  +private Vector vec;
  +
   /**
* Constructor.
*/
  @@ -91,7 +97,10 @@
  String tagdir,
  ErrorDispatcher err) throws JasperException {
   super(prefix, tagdir);
  - 
  + this.pc = pc;
  + this.tagFileMap = new Hashtable();
  + this.vec = new Vector();
  +
tlibversion = TLIB_VERSION;
jspversion = JSP_VERSION;
   
  @@ -110,9 +119,9 @@
shortname = shortname.replace('/', '-');
}
   
  + // Populate mapping of tag names to tag file paths
Set dirList = ctxt.getResourcePaths(tagdir);
if (dirList != null) {
  - Vector vec = new Vector();
Iterator it = dirList.iterator();
while (it.hasNext()) {
String path = (String) it.next();
  @@ -123,16 +132,43 @@
String tagName = path.substring(path.lastIndexOf(/) + 1);
tagName = tagName.substring(0,
tagName.lastIndexOf(TAG_FILE_SUFFIX));
  - TagInfo tagInfo = TagFileProcessor.parseTagFile(pc,
  - tagName,
  - path,
  - this); 
  - vec.addElement(new TagFileInfo(tagName, path, tagInfo));
  + tagFileMap.put(tagName, path);
}
}
  + }
  +}
  +
  +/**
  + * Checks to see if the given tag name maps to a tag file path,
  + * and if so, parses the corresponding tag file.
  + *
  + * @return The TagFileInfo corresponding to the given tag name, or null if
  + * the given tag name is not implemented as a tag file
  + */
  +public TagFileInfo getTagFile(String shortName) {
  +
  + TagFileInfo tagFile = super.getTagFile(shortName);
  + if (tagFile == null) {
  + String path = (String) tagFileMap.get(shortName);
  + if (path == null) {
  + return null;
  + }
  +
  + TagInfo tagInfo = null;
  + try {
  + tagInfo = TagFileProcessor.parseTagFile(pc, shortName, path,
  + this);
  + } catch (JasperException je) {
  + // XXX
  + }
  +
  + tagFile = new TagFileInfo(shortName, path, tagInfo);
  + vec.addElement(tagFile);
   
this.tagFiles = new TagFileInfo[vec.size()];
vec.copyInto(this.tagFiles);
}
  +
  + return tagFile;
   }
   }
  
  
  

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ImplicitTagLibraryInfo.java Parser.java ParserController.java TagFileProcessor.java

2002-08-19 Thread luehe

luehe   2002/08/19 16:06:01

  Modified:jasper2/src/share/org/apache/jasper/compiler
ImplicitTagLibraryInfo.java Parser.java
ParserController.java TagFileProcessor.java
  Log:
  - When dealing with tag files underneath /WEB-INF/tags/, *always*
generate an implicit Tag Library Descriptor, regardless of whether a
TLD file is present in the tag file directory
  
  - Removed 'name' attribute from tag directive.
  
  Revision  ChangesPath
  1.6   +4 -31 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
  
  Index: ImplicitTagLibraryInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ImplicitTagLibraryInfo.java   31 Jul 2002 23:45:50 -  1.5
  +++ ImplicitTagLibraryInfo.java   19 Aug 2002 23:06:01 -  1.6
  @@ -77,14 +77,11 @@
   public class ImplicitTagLibraryInfo extends TagLibraryInfo {
   
   private static final String WEB_INF_TAGS = /WEB-INF/tags/;
  -private static final String TLD_SUFFIX = .tld;
   private static final String TAG_FILE_SUFFIX = .tag;
   private static final String TAGS_SHORTNAME = tags;
   private static final String TLIB_VERSION = 1.0;
   private static final String JSP_VERSION = 2.0;
   
  -private String tldFile;
  -
   /**
* Constructor.
*/
  @@ -117,10 +114,7 @@
Iterator it = dirList.iterator();
while (it.hasNext()) {
String path = (String) it.next();
  - if (path.endsWith(TLD_SUFFIX)) {
  - tldFile = path;
  - break;
  - } else if (path.endsWith(TAG_FILE_SUFFIX)) {
  + if (path.endsWith(TAG_FILE_SUFFIX)) {
// use the filename of the tag file, without the .tag
// extension, as the name subelement of the imaginary
// tag-file element
  @@ -138,26 +132,5 @@
this.tagFiles = new TagFileInfo[vec.size()];
vec.copyInto(this.tagFiles);
}
  -}
  -
  -public static TagLibraryInfo getTabLibraryInfo(JspCompilationContext ctxt,
  -ParserController pc,
  -String prefix, 
  -String tagdir,
  -ErrorDispatcher err)
  - throws JasperException {
  -
  - TagLibraryInfo tagLibInfo = new ImplicitTagLibraryInfo(ctxt, pc,
  -prefix, tagdir,
  -err);
  - if (((ImplicitTagLibraryInfo) tagLibInfo).tldFile != null) {
  - // tagdir contains TLD file
  - String[] location = new String[2];
  - location[0] = ((ImplicitTagLibraryInfo) tagLibInfo).tldFile;
  - tagLibInfo = new TagLibraryInfoImpl(ctxt, pc, prefix, tagdir,
  - location, err);
  - }
  - 
  - return tagLibInfo;
   }
   }
  
  
  
  1.21  +8 -9  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java
  
  Index: Parser.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Parser.java   19 Aug 2002 16:54:16 -  1.20
  +++ Parser.java   19 Aug 2002 23:06:01 -  1.21
  @@ -376,12 +376,11 @@
} else {
String tagdir = attrs.getValue(tagdir);
if (tagdir != null) {
  - tagLibInfo = ImplicitTagLibraryInfo.getTabLibraryInfo(
  -ctxt,
  - parserController,
  - prefix, 
  - tagdir,
  - err);
  + tagLibInfo = new ImplicitTagLibraryInfo(ctxt,
  + parserController,
  + prefix, 
  + tagdir,
  + err);
}
}
if (tagLibInfo != null) {
  
  
  
  1.10  +0 -10 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  

cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ImplicitTagLibraryInfo.java

2002-07-31 Thread luehe

luehe   2002/07/31 15:46:27

  Modified:jasper2/src/share/org/apache/jasper/compiler
ImplicitTagLibraryInfo.java
  Log:
  Supply name parameter to TagFileProcessor.parseTagFile()
  
  Revision  ChangesPath
  1.4   +8 -6  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
  
  Index: ImplicitTagLibraryInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ImplicitTagLibraryInfo.java   26 Jul 2002 23:21:00 -  1.3
  +++ ImplicitTagLibraryInfo.java   31 Jul 2002 22:46:27 -  1.4
  @@ -119,9 +119,11 @@
tldFile = path;
break;
} else if (path.endsWith(.tag)) {
  - tagVector.addElement(TagFileProcessor.parseTagFile(pc,
  -path,
  -this)); 
  + tagVector.addElement(
  +TagFileProcessor.parseTagFile(pc,
  +   shortname,
  +   path,
  +   this)); 
}
}
   
  
  
  

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ImplicitTagLibraryInfo.java TagFileProcessor.java

2002-07-31 Thread luehe

luehe   2002/07/31 16:45:50

  Modified:jasper2/src/share/org/apache/jasper/compiler
ImplicitTagLibraryInfo.java TagFileProcessor.java
  Log:
  Modified implicit taglibrary generator to populate new tagFiles
  field in TagLibraryInfo
  
  Revision  ChangesPath
  1.5   +22 -14
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
  
  Index: ImplicitTagLibraryInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ImplicitTagLibraryInfo.java   31 Jul 2002 22:46:27 -  1.4
  +++ ImplicitTagLibraryInfo.java   31 Jul 2002 23:45:50 -  1.5
  @@ -63,6 +63,7 @@
   import java.util.*;
   import javax.servlet.jsp.tagext.TagLibraryInfo;
   import javax.servlet.jsp.tagext.TagInfo;
  +import javax.servlet.jsp.tagext.TagFileInfo;
   import org.apache.jasper.JspCompilationContext;
   import org.apache.jasper.JasperException;
   
  @@ -101,7 +102,8 @@
err.jspError(jsp.error.invalid.tagdir, tagdir);
}

  - // Determine the value of the short-name element
  + // Determine the value of the short-name subelement of the
  + // imaginary taglib element
if (tagdir.equals(WEB_INF_TAGS)) {
shortname = TAGS_SHORTNAME;
} else {
  @@ -111,24 +113,30 @@
   
Set dirList = ctxt.getResourcePaths(tagdir);
if (dirList != null) {
  - Vector tagVector = new Vector();
  + Vector vec = new Vector();
Iterator it = dirList.iterator();
while (it.hasNext()) {
String path = (String) it.next();
  - if (path.endsWith(.tld)) {
  + if (path.endsWith(TLD_SUFFIX)) {
tldFile = path;
break;
  - } else if (path.endsWith(.tag)) {
  - tagVector.addElement(
  -TagFileProcessor.parseTagFile(pc,
  -   shortname,
  -   path,
  -   this)); 
  + } else if (path.endsWith(TAG_FILE_SUFFIX)) {
  + // use the filename of the tag file, without the .tag
  + // extension, as the name subelement of the imaginary
  + // tag-file element
  + String tagName = path.substring(path.lastIndexOf(/) + 1);
  + tagName = tagName.substring(0,
  + tagName.lastIndexOf(TAG_FILE_SUFFIX));
  + TagInfo tagInfo = TagFileProcessor.parseTagFile(pc,
  + tagName,
  + path,
  + this); 
  + vec.addElement(new TagFileInfo(tagName, path, tagInfo));
}
}
   
  - tags = new TagInfo[tagVector.size()];
  - tagVector.copyInto (this.tags);
  + this.tagFiles = new TagFileInfo[vec.size()];
  + vec.copyInto(this.tagFiles);
}
   }
   
  
  
  
  1.6   +6 -6  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagFileProcessor.java
  
  Index: TagFileProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagFileProcessor.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TagFileProcessor.java 31 Jul 2002 21:42:27 -  1.5
  +++ TagFileProcessor.java 31 Jul 2002 23:45:50 -  1.6
  @@ -311,8 +311,9 @@
* handler that it represents is referenced.  The tag file is not compiled
* here.
* @param pc the current ParserController used in this compilation
  - * @param tagile the path for the tagfile
  - * @param tagLibInfo the TaglibraryInfo object associated with this TagInfo
  + * @param name the tag name as specified in the TLD
  + * @param tagfile the path for the tagfile
  + * @param tagLibInfo the TagLibraryInfo object associated with this TagInfo
* @return a TagInfo object assembled from the directives in the tag file.
*/
   public static TagInfo parseTagFile(ParserController pc,
  @@ -321,7 +322,6 @@
   TagLibraryInfo tagLibInfo)
   throws JasperException {
   
  -
   Node.Nodes page = null;
try {
page = pc.parse(tagfile);
  @@ -342,7 +342,7 @@
* Compiles and loads a tagfile.
   

cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ImplicitTagLibraryInfo.java

2002-07-26 Thread luehe

luehe   2002/07/26 16:21:00

  Modified:jasper2/src/share/org/apache/jasper/compiler
ImplicitTagLibraryInfo.java
  Log:
  Added Header, Revision, and Date CVS keywords
  
  Revision  ChangesPath
  1.3   +8 -0  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
  
  Index: ImplicitTagLibraryInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ImplicitTagLibraryInfo.java   26 Jul 2002 01:07:14 -  1.2
  +++ ImplicitTagLibraryInfo.java   26 Jul 2002 23:21:00 -  1.3
  @@ -1,4 +1,10 @@
   /*
  + * $Header$
  + * $Revision$
  + * $Date$
  + *
  + * 
  + * 
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation.  All rights 
  @@ -64,6 +70,8 @@
* Class responsible for generating an implicit tag library containing tag
* handlers corresponding to the tag files in /WEB-INF/tags/ or a 
* subdirectory of it.
  + *
  + * @author Jan Luehe
*/
   public class ImplicitTagLibraryInfo extends TagLibraryInfo {
   
  
  
  

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