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

2003-02-03 Thread luehe
luehe   2003/02/03 12:11:43

  Modified:jasper2/src/share/org/apache/jasper/compiler JspUtil.java
Validator.java
   jasper2/src/share/org/apache/jasper/resources
messages.properties messages_fr.properties
  Log:
  Fixed 16728: Translation error not raised of jsp:attribute is provided
  an invalid value to the 'scope' attribute
  
  Revision  ChangesPath
  1.29  +23 -3 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspUtil.java
  
  Index: JspUtil.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspUtil.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- JspUtil.java  22 Jan 2003 20:08:24 -  1.28
  +++ JspUtil.java  3 Feb 2003 20:11:41 -   1.29
  @@ -225,6 +225,26 @@
   }
   
   /**
  + * Checks to see if the given scope is valid.
  + *
  + * @param scope The scope to be checked
  + * @param n The Node containing the 'scope' attribute whose value is to be
  + * checked
  + * @param err error dispatcher
  + *
  + * @throws JasperException if scope is not null and different from
  + * quot;pagequot;, quot;requestquot;, quot;sessionquot;, and
  + * quot;applicationquot;
  + */
  +public static void checkScope(String scope, Node n, ErrorDispatcher err)
  +throws JasperException {
  + if (scope != null  !scope.equals(page)  !scope.equals(request)
  +  !scope.equals(session)  !scope.equals(application)) {
  + err.jspError(n, jsp.error.invalid.scope, scope);
  + }
  +}
  +
  +/**
* Checks if all mandatory attributes are present and if all attributes
* present have valid names.  Checks attributes specified as XML-style
* attributes as well as attributes specified using the jsp:attribute
  
  
  
  1.71  +12 -3 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java
  
  Index: Validator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- Validator.java27 Jan 2003 23:15:34 -  1.70
  +++ Validator.java3 Feb 2003 20:11:42 -   1.71
  @@ -542,6 +542,7 @@
   
String name = n.getTextAttribute (id);
String scope = n.getTextAttribute (scope);
  + JspUtil.checkScope(scope, n, err);
String className = n.getTextAttribute (class);
String type = n.getTextAttribute (type);
BeanRepository beanInfo = pageInfo.getBeanRepository();
  @@ -941,6 +942,10 @@
public void visit(Node.InvokeAction n) throws JasperException {
   
   JspUtil.checkAttributes(Invoke, n, invokeAttrs, err);
  +
  + String scope = n.getTextAttribute (scope);
  + JspUtil.checkScope(scope, n, err);
  +
if (n.getAttributeValue(var) != null
 n.getAttributeValue(varReader) != null) {
err.jspError(n, jsp.error.invoke.varAndVarReader);
  @@ -950,6 +955,10 @@
public void visit(Node.DoBodyAction n) throws JasperException {
   
   JspUtil.checkAttributes(DoBody, n, doBodyAttrs, err);
  +
  + String scope = n.getTextAttribute (scope);
  + JspUtil.checkScope(scope, n, err);
  +
if (n.getAttributeValue(var) != null
 n.getAttributeValue(varReader) != null) {
err.jspError(n, jsp.error.doBody.varAndVarReader);
  
  
  
  1.87  +2 -2  
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.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- messages.properties   1 Feb 2003 02:41:13 -   1.86
  +++ messages.properties   3 Feb 2003 20:11:42 -   1.87
  @@ -31,7 +31,7 @@
   by jsp directive defined earlier: 
   jsp.error.usebean.not.both=useBean: Can't specify both class and beanName 
attribute: 
   jsp.error.usebean.bad.type.cast=useBean ({0}): Type ({1}) is not assignable from 
class ({2}) 
  -jsp.error.usebean.invalid.scope=Invalid scope ({1}) in useBean: ({0}).
  +jsp.error.invalid.scope=Invalid value of 'scope' attribute: {0} (must be one of 
\page\, \request\, \session\, or \application\)
   jsp.error.classname=Can't determine classname from .class file
   jsp.warning.bad.type=Warning: bad type in .class file
   jsp.error.data.file.write=Error while writing data file
  
  
  

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

2002-12-09 Thread luehe
luehe   2002/12/09 14:17:32

  Modified:jasper2/src/share/org/apache/jasper/compiler Parser.java
   jasper2/src/share/org/apache/jasper/resources
messages.properties messages_fr.properties
  Log:
  Fixed Bugzilla 15189: Error message provided when jsp:param element is
  not used properly is misleading
  
  Revision  ChangesPath
  1.43  +9 -7  
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.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- Parser.java   9 Dec 2002 21:51:56 -   1.42
  +++ Parser.java   9 Dec 2002 22:17:32 -   1.43
  @@ -1165,7 +1165,7 @@
*| 'plugin'StdActionContent
*| 'element'   StdActionContent
*/
  -private void parseAction(Node parent) throws JasperException {
  +private void parseStandardAction(Node parent) throws JasperException {
Mark start = reader.mark();
   
if (reader.matches(include)) {
  @@ -1196,8 +1196,10 @@
parsePlugin(parent);
} else if (reader.matches(element)) {
parseElement(parent);
  + } else if (reader.matches(param)) {
  + err.jspError(start, jsp.error.param.invalidUse);
} else {
  - err.jspError(start, jsp.error.badaction);
  + err.jspError(start, jsp.error.badStandardAction);
}
   }
   
  @@ -1447,7 +1449,7 @@
   } else if (reader.matches(${)) {
   parseELExpression(parent);
} else if (reader.matches(jsp:)) {
  - parseAction(parent);
  + parseStandardAction(parent);
} else if (!parseCustomTag(parent)) {
parseTemplateText(parent);
}
  @@ -1501,7 +1503,7 @@
} else if (reader.matches(${)) {
parseELExpression(parent);
} else if (reader.matches(jsp:)) {
  - parseAction(parent);
  + parseStandardAction(parent);
} else if (!parseCustomTag(parent)) {
parseTemplateText(parent);
}
  
  
  
  1.65  +4 -2  
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.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- messages.properties   6 Dec 2002 19:11:53 -   1.64
  +++ messages.properties   9 Dec 2002 22:17:32 -   1.65
  @@ -103,6 +103,7 @@
   jsp.error.attempt_to_clear_flushed_buffer=Error: Attempt to clear a buffer that's 
already been flushed
   jsp.error.overflow=Error: JSP Buffer overflow
   jsp.error.paramexpected=Expected \param\ tag with \name\ and \value\ 
attributes
  +jsp.error.param.invalidUse=The jsp:param action must not be used outside the 
jsp:include, jsp:forward, or jsp:params elements
   jsp.error.closeindividualparam=param tag needs to be closed with \/\
   jsp.error.closeparams=param tag needs to be closed with /params
   jsp.error.plugin.notype=type not declared in jsp:plugin
  @@ -291,7 +292,7 @@
   jsp.error.could.not.add.taglibraries=Could not add tag one or more libraries.
   jsp.error.duplicate.name.jspattribute=The attribute {0} specified in the standard 
or custom action also appears as the value of the name attribute in the enclosed 
jsp:attribute
   jsp.error.not.in.template={0} not allowed in a template text body.
  -jsp.error.badaction=The action is not a recognizable standard action.
  +jsp.error.badStandardAction=The action is not a recognizable standard action.
   jsp.error.tagdirective.badbodycontent=Invalid body-content ({0}) in tag directive
   jsp.error.page.config_pagedir_encoding_conflict=Page-encoding specified in 
jsp-property-group ({0}) is different from that specified in page directive ({1})
   jsp.error.page.prolog_pagedir_encoding_conflict=Page-encoding specified in XML 
prolog ({0}) is different from that specified in page directive ({1})
  @@ -339,3 +340,4 @@
   jsp.error.tagfile.badSuffix=Missing \.tag\ suffix in tag file path {0}
   jsp.error.tagfile.illegalPath=Missing \/WEB-INF/tags\ or \/META-INF/tags\ in 
tag file path {0}
   jsp.error.plugin.wrongRootElement=Name of root element in {0} different from {1}
  +jsp.error.attribute.invalidPrefix=The attribute prefix {0} does not correspond to 
any imported tag library
  
  
  
  1.7   +2 -2  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_fr.properties
  
  Index: messages_fr.properties
  ===
  RCS file: 

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

2002-11-22 Thread luehe
luehe   2002/11/22 16:04:58

  Modified:jasper2/src/share/org/apache/jasper/resources
messages.properties messages_fr.properties
  Log:
  Applied patch supplied by Ryan Lubke
  
  Revision  ChangesPath
  1.61  +2 -2  
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.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- messages.properties   16 Nov 2002 04:20:10 -  1.60
  +++ messages.properties   23 Nov 2002 00:04:58 -  1.61
  @@ -266,7 +266,7 @@
   jsp.error.empty.body.not.allowed=Empty body not allowed for {0}
   jsp.error.jspbody.required=Must use jsp:body to specify tag body for {0} if 
jsp:attribute is used.
   jsp.error.jspbody.emptybody.only=The {0} tag can only have jsp:attribute in its 
body.
  -jsp.error.no.scriptlets=Scripting elements ( %@, %!, %=, % ) are disallowed 
here.
  +jsp.error.no.scriptlets=Scripting elements ( %!, jsp:declaration, %=, 
jsp:expression, %, jsp:scriptlet ) are disallowed here.
   jsp.error.internal.unexpected_node_type=Internal Error: Unexpected node type 
encountered
   jsp.error.tld.fn.invalid.signature=Invalid syntax for function signature in TLD.  
Tag Library: {0}, Function: {1}
   jsp.error.tld.fn.duplicate.name=Duplicate function name {0} in tag library {1}
  
  
  
  1.5   +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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- messages_fr.properties11 Nov 2002 09:03:56 -  1.4
  +++ messages_fr.properties23 Nov 2002 00:04:58 -  1.5
  @@ -263,7 +263,7 @@
   jsp.error.empty.body.not.allowed=Un corps vide n'est pas autorisé pour {0}
   jsp.error.jspbody.required=Doit utiliser jsp:body pour indiqué le corps de tag body 
de {0} si jsp:attribute est utilisé.
   jsp.error.jspbody.emptybody.only=Le tag {0} ne peut avoir que jsp:attribute dans 
son corps.
  -jsp.error.no.scriptlets=Les éléments de Scripting ( %@, %!, %=, % ) ne sont pas 
autorisés ici.
  +jsp.error.no.scriptlets=Les éléments de Scripting ( %!, jsp:declaration, %=, 
jsp:expression, %, jsp:scriptlet ) ne sont pas autorisés ici.
   jsp.error.internal.unexpected_node_type=Erreur Interne: Type de node inattendu 
rencontré
   jsp.error.tld.fn.invalid.signature=Synthaxe invalide pour la signature de fonction 
dans la TLD.  Librairie de Tag : {0}, Fonction: {1}
   jsp.error.tld.fn.invalid.signature.classnotfound=Synthaxe invalide pour la 
signature de fonction dans la TLD.  Classe introuvable: ${0}.  Librairie de Tag: {1}, 
Fonction: {2}.
  
  
  

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