On 26.07.2016 14:24, Emmanuel Bourg wrote: > On 07/22/2016 08:51 PM, Markus Koschany wrote: > >> I think one issue might be that CATALINA_HOME is in /usr/share/tomcat8 >> by default and CATALINA_BASE is in /var/lib/tomcat8. This is a little >> confusing and I wonder if both should point to /var/lib/tomcat8. > > I don't think we can do that, because we want to separate the read-only > part of Tomcat (the tomcat libraries and the shell scripts, i.e. > CATALINA_HOME under /usr/share) from the writeable part (user libraries, > webapps, JSP cache, i.e. CATALINA_BASE under /var/lib).
That can be easily achieved by using symlinks from /usr/share/tomcat8 to /var/lib/tomcat8. That does not change the file permissions of the libraries and scripts in /usr/share/tomcat8 but would possibly overcome the issue described in this bug report. I was only thinking loud back then because when people try to modify files in /usr/share then there is usually something wrong (bad documentation or bad layout). It might well be that we don't need to change anything but we *could* change the layout in Tomcat 9 by creating a working layout in /var/lib/tomcat8 that could handle the special case when CATALINA_BASE is identical to CATALINA_HOME but also our current case when both are separated and people want to create multiple running instances on the same Tomcat server. I was merely thinking that a structure that completely roots in /var/lib/tomcat8 (with carefully used symlinks) would have its merits because it might be easier to understand. >> In any case it would have been useful to know more about the Netbeans >> plugin in question. Which one is exactly? Without this information I >> can't reproduce the issue and I'm not even sure if this is a bug in >> Tomcat 8 or one of Netbeans' external plugins. More information is required. > > I don't use Netbeans but I tried IntelliJ IDEA 14 on Jessie with the > tomcat8 package. When configuring the application server in the IDE the > CATALINA_HOME path is requested, and optionally the path to > CATALINA_BASE. Setting CATALINA_HOME to /usr/share/tomcat8 isn't enough > as it doesn't contain the conf directory, and setting CATALINA_BASE to > /var/lib/tomcat8 is necessary. That's what I am talking about. If you are tempted to create symlinks in /usr/share/, that's a sign of a layout that could be improved FHS-wise. > Side note: when deploying an application to Tomcat from IntelliJ the > CATALINA_BASE files are copied to another directory > (~/.IntelliJIdea14/system/tomcat/<webappname>/). This copy failed > because /etc/tomcat8/tomcat-users.xml is read protected by default. I > had to remove it to start the webapp from IntelliJ. Ideally /etc/tomcat8/tomcat-users.xml would be copied to your home directory and IntelliJ started to work with this one. But then you have to tell Tomcat somehow how to use the local configuration. /etc/tomcat8/tomcat-users.xml is a global file and should not be modifiable by other people than root IMO. > > I also tried configuring Tomcat in IntelliJ after adding a conf symlink > in /usr/share/tomcat8, and this time setting CATALINA_BASE wasn't required. > > So regardless of the behavior of the Netbeans plugin I think it's worth > adding the conf symlink since it slightly simplifies the configuration > in IntelliJ. > > Emmanuel Bourg I'm still in favor of investigating a better layout but it may pass as a workaround.
signature.asc
Description: OpenPGP digital signature
__ This is the maintainer address of Debian's Java team <http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. Please use debian-j...@lists.debian.org for discussions and questions.