You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2018/07/15 10:12:42 UTC
Don't require a base directory?
Hi guys,
Just tested with Tomcat 9.0.10 embed and it seems the requirement is a base
directory is now arbitrary.
To be concrete I overrided org.apache.catalina.startup.Tomcat#initBaseDir
to not mkdir the folder if it doesn't exist and I ran several apps
(including meecrowave/cdi based ones) without any issue.
Is it possible to relax this constraint? I envision it as a toggle settable
on Tomcat instance (tomcat.setRequiresDirectories(false)). If set it to
false it would disable the mkdir and probably disable the webapp
extractions.
Guess spring boot can benefit from it as well.
Wdyt?
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>
Re: Don't require a base directory?
Posted by Mark Thomas <ma...@apache.org>.
There are multiple places in the Tomcat code where a base directory is
required. Some of those may not be required in the embedded case and
some can be configured around by using absolute paths. However, there
will be some ugly error messages in some cases.
I'd suggest creating an enhancement request to:
- make the setting of a base directory optional
- provide useful error messages at all the points where a base directory
is currently required to highlight the configuration options that
would enable Tomcat to continue
I don't see a need for an explicit configuration option at this point.
Mark
On 19/07/2018 12:44, Romain Manni-Bucau wrote:
> up? :)
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> | Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <https://www.packtpub.com/application-development/java-ee-8-high-performance>
>
>
> Le dim. 15 juil. 2018 à 12:12, Romain Manni-Bucau <rm...@gmail.com> a
> écrit :
>
>> Hi guys,
>>
>> Just tested with Tomcat 9.0.10 embed and it seems the requirement is a
>> base directory is now arbitrary.
>>
>> To be concrete I overrided org.apache.catalina.startup.Tomcat#initBaseDir
>> to not mkdir the folder if it doesn't exist and I ran several apps
>> (including meecrowave/cdi based ones) without any issue.
>>
>> Is it possible to relax this constraint? I envision it as a toggle
>> settable on Tomcat instance (tomcat.setRequiresDirectories(false)). If set
>> it to false it would disable the mkdir and probably disable the webapp
>> extractions.
>>
>> Guess spring boot can benefit from it as well.
>>
>> Wdyt?
>>
>> Romain Manni-Bucau
>> @rmannibucau <https://twitter.com/rmannibucau> | Blog
>> <https://rmannibucau.metawerx.net/> | Old Blog
>> <http://rmannibucau.wordpress.com> | Github
>> <https://github.com/rmannibucau> | LinkedIn
>> <https://www.linkedin.com/in/rmannibucau> | Book
>> <https://www.packtpub.com/application-development/java-ee-8-high-performance>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Don't require a base directory?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
up? :)
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>
Le dim. 15 juil. 2018 à 12:12, Romain Manni-Bucau <rm...@gmail.com> a
écrit :
> Hi guys,
>
> Just tested with Tomcat 9.0.10 embed and it seems the requirement is a
> base directory is now arbitrary.
>
> To be concrete I overrided org.apache.catalina.startup.Tomcat#initBaseDir
> to not mkdir the folder if it doesn't exist and I ran several apps
> (including meecrowave/cdi based ones) without any issue.
>
> Is it possible to relax this constraint? I envision it as a toggle
> settable on Tomcat instance (tomcat.setRequiresDirectories(false)). If set
> it to false it would disable the mkdir and probably disable the webapp
> extractions.
>
> Guess spring boot can benefit from it as well.
>
> Wdyt?
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> | Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github
> <https://github.com/rmannibucau> | LinkedIn
> <https://www.linkedin.com/in/rmannibucau> | Book
> <https://www.packtpub.com/application-development/java-ee-8-high-performance>
>