You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ki...@apache.org on 2003/08/11 23:11:08 UTC

cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources messages.properties messages_es.properties messages_fr.properties messages_ja.properties

kinman      2003/08/11 14:11:08

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        ErrorDispatcher.java JspDocumentParser.java
                        Parser.java
               jasper2/src/share/org/apache/jasper/resources
                        messages.properties messages_es.properties
                        messages_fr.properties messages_ja.properties
  Log:
  - Allow a taglib to be defined more than once in taglib directives, even in
    statically included files.
  - Remove need for keeping a Stack for prefix bookkeeping.
  
  Revision  Changes    Path
  1.12      +24 -3     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ErrorDispatcher.java
  
  Index: ErrorDispatcher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ErrorDispatcher.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ErrorDispatcher.java	5 Feb 2003 23:39:20 -0000	1.11
  +++ ErrorDispatcher.java	11 Aug 2003 21:11:07 -0000	1.12
  @@ -244,7 +244,28 @@
        * @param errCode Error code
        * @param arg1 First argument for parametric replacement
        * @param arg2 Second argument for parametric replacement
  +     * @param arg3 Third argument for parametric replacement
        */
  +
  +    public void jspError(Mark where, String errCode, String arg1, String arg2,
  +                         String arg3)
  +                throws JasperException {
  +        dispatch(where, errCode, new Object[] {arg1, arg2, arg3}, null);
  +    }
  +
  +    /*
  +     * Dispatches the given JSP parse error to the configured error handler.
  +     *
  +     * The given error code is localized. If it is not found in the
  +     * resource bundle for localized error messages, it is used as the error
  +     * message.
  +     *
  +     * @param n Node that caused the error
  +     * @param errCode Error code
  +     * @param arg1 First argument for parametric replacement
  +     * @param arg2 Second argument for parametric replacement
  +     */
  +
       public void jspError(Node n, String errCode, String arg1, String arg2)
   	        throws JasperException {
   	dispatch(n.getStart(), errCode, new Object[] {arg1, arg2}, null);
  
  
  
  1.64      +5 -10     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java
  
  Index: JspDocumentParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- JspDocumentParser.java	9 Aug 2003 14:55:46 -0000	1.63
  +++ JspDocumentParser.java	11 Aug 2003 21:11:07 -0000	1.64
  @@ -109,7 +109,6 @@
       private boolean isTagFile;
       private boolean directivesOnly;
       private boolean isTop;
  -    private LinkedList prefixMapLinkedList;
   
       /*
        * Constructor
  @@ -128,7 +127,6 @@
   	this.isTagFile = isTagFile;
   	this.directivesOnly = directivesOnly;
   	this.isTop = true;
  -        this.prefixMapLinkedList = new LinkedList();;
       }
   
       /*
  @@ -560,9 +558,8 @@
           if (taglibInfo != null) {
               pageInfo.addTaglib(uri, taglibInfo);
               pageInfo.pushPrefixMapping(prefix, uri);
  -            prefixMapLinkedList.addLast(new Boolean(true));
           } else {
  -            prefixMapLinkedList.addLast(new Boolean(false));
  +            pageInfo.pushPrefixMapping(prefix, null);
           }
        }
   
  @@ -570,9 +567,7 @@
         * Receives notification of the end of a Namespace mapping. 
         */
       public void endPrefixMapping(String prefix) throws SAXException {
  -        if (((Boolean) prefixMapLinkedList.removeFirst()).booleanValue()) {
  -            pageInfo.popPrefixMapping(prefix);
  -        }
  +        pageInfo.popPrefixMapping(prefix);
       }
   
   
  
  
  
  1.79      +8 -3      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.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- Parser.java	9 Aug 2003 19:18:22 -0000	1.78
  +++ Parser.java	11 Aug 2003 21:11:07 -0000	1.79
  @@ -451,6 +451,11 @@
   	String prefix = attrs.getValue("prefix");
   	if (prefix != null) {
   	    if (uri != null) {
  +		String uriPrev = pageInfo.getURI(prefix);
  +		if (uriPrev != null && !uriPrev.equals(uri)) {
  +		    err.jspError(reader.mark(), "jsp.error.prefix.refined",
  +			prefix, uri, uriPrev);
  +		}
   		if (pageInfo.getTaglib(uri) == null) {
   		    String[] location = ctxt.getTldLocation(uri);
   		    pageInfo.addTaglib(uri,
  
  
  
  1.127     +2 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties
  
  Index: messages.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- messages.properties	22 Jul 2003 21:04:46 -0000	1.126
  +++ messages.properties	11 Aug 2003 21:11:07 -0000	1.127
  @@ -395,3 +395,4 @@
   jsp.error.signature.classnotfound=The class {0} specified in the method signature in TLD for the function {1} cannot be found. {2}
   jsp.error.text.has_subelement=<jsp:text> must not have any subelements
   jsp.error.data.file.read=Error reading file \"{0}\"
  +jsp.error.prefix.refined=Attempt to redefine the prefix {0} to {1}, when it was already defined as {2} in the current scope.
  
  
  
  1.42      +2 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_es.properties
  
  Index: messages_es.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_es.properties,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- messages_es.properties	21 Jul 2003 21:52:51 -0000	1.41
  +++ messages_es.properties	11 Aug 2003 21:11:07 -0000	1.42
  @@ -255,3 +255,4 @@
   jsp.error.prelude.xml=
   jsp.error.coda.xml=
   jsp.error.jsptext.badcontent=
  +jsp.error.prefix.refined=
  
  
  
  1.27      +2 -2      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_fr.properties
  
  Index: messages_fr.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_fr.properties,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- messages_fr.properties	21 Jul 2003 21:52:51 -0000	1.26
  +++ messages_fr.properties	11 Aug 2003 21:11:07 -0000	1.27
  @@ -292,4 +292,4 @@
   jsp.error.prelude.xml=
   jsp.error.coda.xml=
   jsp.error.jsptext.badcontent=
  -
  +jsp.error.prefix.refined=
  
  
  
  1.43      +2 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_ja.properties
  
  Index: messages_ja.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_ja.properties,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- messages_ja.properties	21 Jul 2003 21:52:51 -0000	1.42
  +++ messages_ja.properties	11 Aug 2003 21:11:07 -0000	1.43
  @@ -347,3 +347,4 @@
   jsp.error.variable.alias=name-from-attribute\u304a\u3088\u3073alias\u5c5e\u6027\u306e\u4e21\u65b9\u3092variable\u6307\u793a\u5b50\u4e2d\u306b\u6307\u5b9a\u3059\u308b\u3001\u307e\u305f\u306f\u3069\u3061\u3089\u3082\u6307\u5b9a\u3057\u306a\u3044\u3053\u3068\u304c\u3067\u304d\u307e\u3059
   jsp.error.prelude.xml=JSP\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 {0} \u306f\u305d\u308c\u306b\u95a2\u9023\u3057\u305f\u5c0e\u5165\u90e8 ({1}) \u3092\u6301\u3063\u3066\u3044\u307e\u3059
   jsp.error.coda.xml=JSP\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 {0} \u306f\u305d\u308c\u306b\u95a2\u9023\u3057\u305f\u7d42\u7d50\u90e8 ({1}) \u3092\u6301\u3063\u3066\u3044\u307e\u3059
  +jsp.error.prefix.refined=
  
  
  

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