-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 4/22/19 06:58, Mark Thomas wrote:
> On 21/04/2019 15:53, Garret Wilson wrote:
>> As I mentioned in other emails, I am embedding Tomcat 9 (with
>> OpenJDK 11 on Windows 10) to serve static files from `/foo/bar`.
>> Currently I'm not supporting Java webapps. I'm not supporting
>> JSP. I just want to serve static files.
>> 
>> From your help in another thread, I called the magic 
>> "gets-but-really-creates-a-connection" method and got it
>> working.
>> 
>> But now I realize Tomcat is creating this directory structur
>> inside the "base dir" I specified:
>> 
>> tomcat.8080/work/Tomcat/localhost/ROOT
>> 
>> I don't need this directory. I don't want this directory created.
>> How do I tell Tomcat not to create no danged directories?
> 
> The Servlet specification requires (see section 4.8.1 of the
> Servlet 4.0 spec) that Tomcat provides a private temporary
> directory for each servlet context (web application).
> 
> The best you can do is specify an absolute path that already exists
> for the Context's work directory. It doesn't need to be writeable.
> If you are using it for multiple web applications you probably
> don't want it to be writeable.

Could a <Resource> be used to map a virtual directory for the work
directory? For example, trick Tomcat into using a "directory" within a
JAR file or something as the "work" directory? Obviously, it will fail
if Tomcat tries to write a temporary file, but that's kind of the point.

George, you can always use the "document-root" (to use httpd's
parlance) as the work directory, since it also must exist.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAly9w1sACgkQHPApP6U8
pFiGPBAAujnlk8kSIZQUUe5ydJZuU4TMvzn0NFFcE3zetldHklQ3HNSgCAff5s7D
oNbHHiGKRiS1fDaa4hUSePdsZZcnwGlfzEZdIbn05NFZLl7OCASiH1F4FS+hW0cf
vBGfVGOdPIDHGaIFGeTDi28ADi2TP1RoHLdCNHJK1Ul/bbesiw9vKvPkyRfY6g7X
+OPzWY/p7Ke0Q3JvGQISVplRkKZ6HtYtCIo3k0nMciE2RNZUIsIC3451rQD4vjxo
Bn+ZZZkP56Ff0Xzxc18Fx9Yut+4RV+SpVbESHc+q45YtlGIrYQi/QMvTJ3ZpGN4u
6me+t5CZvqnxgwQOSKFzXtijaPdS9awtlqmhSLKT5hSc/kGpkhjKs2Nie6faZcs2
7WPMzJu6JqRW93j0NtE1V7cPmvozKlaKCjMRaRB8XCv25vpePGZ9YKwTq5C7GNqX
++h1f/s2BWsbFshlfF6KRCov5nNi/eHNKHSMUz4JBKzc+mzabTCqE7TGWIbxeJtA
mJ8UUzyMzaigTY0THduRrwQbTECbTBwGpbXf2m4fP0XF6rKNRepzG4j8XD/bTFQP
fp3oEYUAOYms+TGd/fYlvTNUQHm3S2PpM4Y868KfHm3kCPREdLXnqfjTWtBj+WdF
DSkMgoHj09hJ69njFvuThqQ99wJbtIhu8wg6oNf5TvD7ghXdOKk=
=Gx4M
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to