|
From: Colin Y. <col...@gm...> - 2006-07-17 09:49:30
|
Jason, I noticed this myself and created a JIRA a while ago: http://opensource.atlassian.com/projects/spring/browse/SPR-1884. Col On 17/07/06, Jason W. Solinsky <jso...@co...> wrote: > > Method getResourceByPath in FileSystemXmlApplicationContext strips leading > "/" from paths before loading the resource (in this case the context > file). > > The java docs explain this behavior as follows: > > "Note: Even if a given path starts with a slash, it will get interpreted > as > relative to the current VM working directory. This is consistent with the > semantics in a Servlet container." > > Shouldn't servlet specific semantics be implemented by servlet specific > classes? (Note that the WebApplicationContexts do not appear to extend > FileSystemXmlApplicationContext [anymore?]). > > As a consequence of this behavior, Unix paths beginning with "/" become > relative, but Windows paths beginning in "C:\" remain absolute. We have > temporarily gotten around this by inserting an extra "/" in front of every > path that we use to configure the FileSystemXmlApplicationContext, but > this > seems like a horrible hack. > > Thanks to Spring's wonderful design, we can easily create our own subclass > that avoids this behavior, but shouldn't the servlet specific > functionality > be removed from this method altogether? > > Thanks, > > JWS > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |