DO NOT REPLY [Bug 9356] - ServletContext.getResourcePaths does not return null value
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9356. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9356 ServletContext.getResourcePaths does not return null value --- Additional Comments From [EMAIL PROTECTED] 2002-06-05 14:17 --- Created an attachment (id=2012) Patch to ApplicationContextFacade.java to return null if no ResourcePaths exist (Per Servelet Spec) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 9356] - ServletContext.getResourcePaths does not return null value
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9356. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9356 ServletContext.getResourcePaths does not return null value --- Additional Comments From [EMAIL PROTECTED] 2002-06-05 14:25 --- I agree with the poster, the Spec says null is what should be returned, not an empty Set. I gave these patches a run through and the Examples are all working fine. Is there any additional testing I should do to ensure this change isnt going to cause a fire elsewhere (something like a regression test suite - which mind you would be a pain in the ass to run all the time, but might save a dependent project some grief from a unintended side effect.) Those doubts aside, can somebody commit these 2 small changes? Cheers, [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 9356] - ServletContext.getResourcePaths does not return null value
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9356. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9356 ServletContext.getResourcePaths does not return null value --- Additional Comments From [EMAIL PROTECTED] 2002-06-05 14:49 --- Please see bug 9634 (this addes tests to watchdog for the method ServletContext.getResourcePaths()). Also see the patch I submitted in an accidentally duplicated bug 9629. The patch in 9629 does the same thing as the one in this bug, plus a fix for bug 5603 (see notes in that bug 9629 for details). Thanks for getting this fixed. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 9356] - ServletContext.getResourcePaths does not return null value
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9356. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9356 ServletContext.getResourcePaths does not return null value [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2002-06-06 00:18 --- This has now been fixed. The fix will be in 4.0.4, as well as 4.1.4. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 9356] - ServletContext.getResourcePaths does not return null value
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9356. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9356 ServletContext.getResourcePaths does not return null value [EMAIL PROTECTED] changed: What|Removed |Added Summary|getResource |ServletContext.getResourcePa ||ths does not return null ||value --- Additional Comments From [EMAIL PROTECTED] 2002-05-23 15:49 --- According to the servlet spec (2.3 Final) getResourcePaths(String) ... Returns: a Set containing the directory listing, or null if there are no resources in the web application whose path begins with the supplied path. However, Catalina returns an empty Set (rather than a null value) for paths that do not exist in the WAR. Here is my test JSP page: %! public void checkPath(String path, ServletContext context, JspWriter out) throws java.io.IOException { out.println(CHECKING PATH: + path); java.util.Set resources = context.getResourcePaths(path); out.println( Null return value? + (resources==null)); if (resources!=null) { out.println( EMPTY? + resources.isEmpty()); java.util.Iterator iter = resources.iterator(); while (iter.hasNext()) out.println( + iter.next()); } out.println(); } % pre % checkPath(/, application, out); checkPath(/WEB-INF, application, out); checkPath(/WEB-INF/, application, out); checkPath(/ShOuLd_NoT_eXiST, application, out); checkPath(/ShOuLd_NoT_eXiST/, application, out); % /pre And here is part of the sample output: CHECKING PATH: /WEB-INF/ Null return value? false EMPTY? false /WEB-INF//web.xml CHECKING PATH: /ShOuLd_NoT_eXiST Null return value? false EMPTY? true CHECKING PATH: /ShOuLd_NoT_eXiST/ Null return value? false EMPTY? true -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]