DO NOT REPLY [Bug 52474] Do not load listeners declared with blank spaces on tld file.

2012-01-20 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52474

--- Comment #4 from Mark Thomas ma...@apache.org 2012-01-20 11:38:35 UTC ---
The text of the JSP specification doesn't include any details on how TLDs
should be parsed. I can see where you are coming from with that chain of
references but the meaning of those is that listeners defined in TLDs are
equivalent to listeners defined in web.xml.

There is, however, a definitive answer if one looks at the Java EE XSDs.
Listeners in TLDs are of type javaee:listenerType
javaee:listenerType contains a listener-class of type
javaee:fully-qualified-classType
javaee:fully-qualified-classType has a base type of javaee:string
The definition of javaee:string requires that leading and trailing white space
is removed.

Therefore, the correct behaviour is to remove the leading and trailing white
space. It looks like this may affect many more elements than just the
listeners.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 52474] Do not load listeners declared with blank spaces on tld file.

2012-01-20 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52474

--- Comment #5 from Helio Frota heliofr...@gmail.com 2012-01-20 12:25:57 UTC 
---
On org.apache.catalina.core.StandardContext class line 4701 what is the impact
of adding a call to trim() ?


try {
results[i] = instanceManager.newInstance(listeners[i]);
}
...


try {
results[i] = instanceManager.newInstance(listeners[i].trim());
}
...

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 52474] Do not load listeners declared with blank spaces on tld file.

2012-01-20 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52474

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #6 from Mark Thomas ma...@apache.org 2012-01-20 21:21:07 UTC ---
That would work but I prefer fixing the problem at the source - during the
parsing.

Normally, the digester trims white space, hence web.xml elements should be OK.
Listeners in TLDs require special handling so the generic digester code that
strips the white space isn't used. I have added a trim() to the listener
handling code.

The fix has been made to trunk and 7.0.x and will be included in 7.0.26
onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 52474] Do not load listeners declared with blank spaces on tld file.

2012-01-20 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52474

--- Comment #7 from Helio Frota heliofr...@gmail.com 2012-01-21 02:30:58 UTC 
---
Thank you for your attention
The Java community thanks you.


Best regargs,
Helio Frota

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 52474] Do not load listeners declared with blank spaces on tld file.

2012-01-19 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52474

Helio Frota heliofr...@gmail.com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 52474] Do not load listeners declared with blank spaces on tld file.

2012-01-18 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52474

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #2 from Mark Thomas ma...@apache.org 2012-01-18 09:32:50 UTC ---
The error is in the TLD file, not how Tomcat handles it.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 52474] Do not load listeners declared with blank spaces on tld file.

2012-01-18 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52474

--- Comment #3 from Helio Frota heliofr...@gmail.com 2012-01-18 10:26:50 UTC 
---
Hello Mark Thomas,

Servlet specification 2.5:

SRV.13.2

Rules for Processing the Deployment Descriptor

This section lists some general rules that Web containers and developers must
note concerning the processing of the deployment descriptor for a Web
application.

• Web containers must remove all leading and trailing whitespace, which is de-
fined as “S(white space)” in XML 1.0 (http://www.w3.org/TR/2000/WD-xml-
2e-2814), for the element content of the text nodes of a deployment de-
scriptor.

JSP Specification:

JSP.7.1.9
Event Listeners
A tag library may include classes that are event listeners (see the Servlet 2.5
specification). The listeners classes are listed in the tag library descriptor
and the JSP container automatically instantiates them and registers them. A
Container is required to locate all TLD files (see Section JSP.7.3.1 for
details on how they are identified), read their listener elements, and treat
the event listeners as extensions of those listed in web.xml.
The order in which the listeners are registered is undefined, but they are
registered before application start.

So if the TLD file should be treated as an extension of the web.xml file, so
the container should deal with the removal of any blank space right ?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 52474] Do not load listeners declared with blank spaces on tld file.

2012-01-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52474

--- Comment #1 from Helio Frota heliofr...@gmail.com 2012-01-17 05:43:30 UTC 
---
Comment on attachment 28163
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=28163
debugging tomcat source

Image eclipse debugging attached.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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