You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Crowther <Pe...@melandra.com> on 2004/11/04 14:11:25 UTC

Can I configure a webapp that is stored on something other than filestore?

I'm working on a virtual learning environment.  It's essentially one
huge webapp.  We don't want to manage files on the physical filestore;
instead, we want to use our own virtual filestore, for reasons too zany
to go into.

Is there a way of setting eg. an appBase or a docBase so that it points,
not to filestore, but to a URI?  If so, we can add an appropriate
handler to the URIs so that we manage vfs:... and everything Just Works.

Failing that, is there another appropriate mechanism for intercepting
filestore access from Tomcat and redirecting it to our own code?

A bit of an open question, I know.  The Tomcat 4 documentation appears
to indicate that a Host's appBase is a URL but, on trying it with
5.0.28, file: URLs are not recognised, let alone anything more
outlandish.

All help gratefully received!

		- Peter
--
Peter Crowther, Director, Melandra Limited
John Dalton House, 121 Deansgate, Manchester M3 2AB
t: +44 (0)161 828 8736  f: +44 (0)161 832 5683

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Can I configure a webapp that is stored on something other than filestore?

Posted by Steve Kirk <to...@web-startup.co.uk>.
I believe that if your servlet is /mywebapp/myServlet and your user accesses
/mywebapp/myServlet/iwant/this/file, the "iwant/this/file" part is available
as the request parameter getPathInfo() and you can do what you like with
that - access a database, access any filesystem to which you have access,
redirect to another URI, etc.  So all you need to do is write a simple
servlet that maps their request to whatever resource you want to map it to.
This could include a simple redirect to another URI.  Never used this myself
but have noticed it in the docs.

> -----Original Message-----
> From: Peter Crowther [mailto:Peter.Crowther@melandra.com] 
> Sent: Thursday 04 November 2004 13:11
> To: tomcat-user@jakarta.apache.org
> Subject: Can I configure a webapp that is stored on something 
> other than filestore?
> 
> 
> I'm working on a virtual learning environment.  It's essentially one
> huge webapp.  We don't want to manage files on the physical filestore;
> instead, we want to use our own virtual filestore, for 
> reasons too zany
> to go into.
> 
> Is there a way of setting eg. an appBase or a docBase so that 
> it points,
> not to filestore, but to a URI?  If so, we can add an appropriate
> handler to the URIs so that we manage vfs:... and everything 
> Just Works.
> 
> Failing that, is there another appropriate mechanism for intercepting
> filestore access from Tomcat and redirecting it to our own code?
> 
> A bit of an open question, I know.  The Tomcat 4 documentation appears
> to indicate that a Host's appBase is a URL but, on trying it with
> 5.0.28, file: URLs are not recognised, let alone anything more
> outlandish.
> 
> All help gratefully received!
> 
> 		- Peter
> --
> Peter Crowther, Director, Melandra Limited
> John Dalton House, 121 Deansgate, Manchester M3 2AB
> t: +44 (0)161 828 8736  f: +44 (0)161 832 5683
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org