Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servletsDefaultServlet.java
[EMAIL PROTECTED] wrote: funkman 2003/06/16 18:31:12 Modified:catalina/src/conf web.xml catalina/src/share/org/apache/catalina/servlets DefaultServlet.java Log: - Allow a site (webapp) wide xslt transformation for look (real file name) - Allow per directory xslt transformation for customized look - Allow a readme file to be rendered with the directory listing - fix typo in row color when trying to gray bar lines Any suggestions on not making globalXsltFile a real file but still cross webapp app friendly? Good idea (the readme is very Apache like; I like it), but IMO the code is a bit too complex for what it wants to achieve. To access a resource (such as the XSL stylesheet and readme file), you don't need ResourceInfo (which is a placeholder for many things other than the binary content). You should do a lookup on the resources DirContext, cast that to Resource, and use getContent (and if somehow it returns null, fall back to using streamContent). Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servletsDefaultServlet.java
ok. I was originally using servletContext().getResourceAsStream(...) and switched to ResourceInfo to attempt to stay consistent with its usage. I'll switch it to Resource (hopefully) today/tommorrow. (unless someone beats me to it) -Tim Remy Maucherat wrote: [EMAIL PROTECTED] wrote: funkman 2003/06/16 18:31:12 Modified:catalina/src/conf web.xml catalina/src/share/org/apache/catalina/servlets DefaultServlet.java Log: - Allow a site (webapp) wide xslt transformation for look (real file name) - Allow per directory xslt transformation for customized look - Allow a readme file to be rendered with the directory listing - fix typo in row color when trying to gray bar lines Any suggestions on not making globalXsltFile a real file but still cross webapp app friendly? Good idea (the readme is very Apache like; I like it), but IMO the code is a bit too complex for what it wants to achieve. To access a resource (such as the XSL stylesheet and readme file), you don't need ResourceInfo (which is a placeholder for many things other than the binary content). You should do a lookup on the resources DirContext, cast that to Resource, and use getContent (and if somehow it returns null, fall back to using streamContent). Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]