[VFS] the "web" scheme

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[VFS] the "web" scheme

Philippe Poulard
hi,

i currently try to use VFS in a webapp, and of course, I have to deal
with web resources :

ServletContext#getServletContext()

so, I've had the idea of using VFS to resolve such resources, like the
"res" scheme does for ClassLoader resources, like this :

web:///WEB-INF/web.xml
that would be map to :
file:///path/to/tomcat/webapps/myApp/WEB-INF/web.xml

usage :
FileObject file = myFileSystemManager.resolveFile(
"web:///WEB-INF/web.xml" );
file.getContent().setParameter( "web-context", myServletContext );
file.getInputStream();
...

advice ?

--
Cordialement,

            ///
           (. .)
  -----ooO--(_)--Ooo-----
|   Philippe Poulard    |
  -----------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [VFS] the "web" scheme

Philippe Poulard
oops !

read this:
ServletContext#getRealPath()

--
Cordialement,

            ///
           (. .)
  -----ooO--(_)--Ooo-----
|   Philippe Poulard    |
  -----------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]