-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rene,

I'll put comments inline since I have very few to write. Hopefully you
can find them.


On 8/14/2014 7:22 AM, Rene Scheffler wrote:
> Hello,
> 
> So when i start the Tomcat and tail -f at the catalina.out in 
> /opt/tomcat/logs/, i see this happening during the startup. I did a
> lot of google research before posting this and looked through 
> various posts, containing info on the deployment Process. I even
> checked the API reference but there was no real info on that. I
> guess, that " they are there if you know where to look, but it
> takes a while before you get to that point." applies to my
> situtation.
> 
> Aug 14, 2014 11:02:23 AM org.apache.catalina.startup.HostConfig 
> deployDirectory INFO: Deploying web application directory
> /opt/railo/tomcat/lib Aug 14, 2014 11:02:25 AM
> org.apache.catalina.startup.HostConfig deployDirectory INFO:
> Deploying web application directory /opt/railo/tomcat/bin Aug 14,
> 2014 11:02:26 AM org.apache.catalina.startup.HostConfig 
> deployDirectory INFO: Deploying web application directory
> /opt/railo/tomcat/bin Aug 14, 2014 11:02:28 AM
> org.apache.catalina.startup.HostConfig deployDirectory INFO:
> Deploying web application directory /opt/railo/tomcat/work Aug 14,
> 2014 11:02:28 AM org.apache.catalina.startup.HostConfig 
> deployDirectory INFO: Deploying web application directory
> /opt/railo/tomcat/work Aug 14, 2014 11:02:30 AM
> org.apache.catalina.startup.HostConfig deployDirectory INFO:
> Deploying web application directory /opt/railo/tomcat/logs Aug 14,
> 2014 11:02:31 AM org.apache.catalina.startup.HostConfig 
> deployDirectory INFO: Deploying web application directory
> /opt/railo/tomcat/logs Aug 14, 2014 11:02:33 AM
> org.apache.catalina.startup.HostConfig deployDirectory INFO:
> Deploying web application directory /opt/railo/tomcat/temp Aug 14,
> 2014 11:02:33 AM org.apache.catalina.startup.HostConfig 
> deployDirectory INFO: Deploying web application directory
> /opt/railo/tomcat/temp Aug 14, 2014 11:02:35 AM
> org.apache.catalina.startup.HostConfig deployDirectory INFO:
> Deploying web application directory /opt/railo/tomcat/conf Aug 14,
> 2014 11:02:36 AM org.apache.catalina.startup.HostConfig 
> deployDirectory INFO: Deploying web application directory
> /opt/railo/tomcat/conf Aug 14, 2014 11:02:38 AM
> org.apache.catalina.startup.HostConfig deployDirectory INFO:
> Deploying web application directory /opt/railo/tomcat/webapps Aug
> 14, 2014 11:02:38 AM org.apache.catalina.startup.HostConfig 
> deployDirectory INFO: Deploying web application directory
> /opt/railo/tomcat/webapps
> 

==================

All of these lines are problems. Tomcat thinks (with your
configuration) that $CATALINA_BASE/bin, $CATALINA_BASE/lib,
$CATALINA_BASE/logs, etc. are all web applications. They're not.

Now Let's look at the Railo configuration you used (from another message).

<init-param>
   <param-name>configuration</param-name>
   <param-value>{web-root-directory}/WEB-INF/railo</param-value>
   <description>Configuration directory</description>
</init-param>

And let's compare it with the snippet from the reference you posted.

<init-param>
   <param-name>configuration</param-name>
   <param-value>/WEB-INF/railo</param-value>
   <description>Configuration directory</description>
</init-param>

The reference does not have the leading {web-root-directory}
specified. I am guessing that you put $CATALINA_BASE (the directory
where Tomcat is running from) in as {web-root-directory}. This would
explain the explosion of improper WEB-INF directories.

Also from the reference you posted:

Note: embedding Railo directly in Tomcat like this means that you will
end up with a generated WEB-INF/ folder in each webroot, containing
some Railo files (about 2MB).

If we translate this from CFM-speak to J2EE speak, this means that a
WEB-INF folder will be generated for every context (aka webroot).

By default, contexts (or webroots) are housed in
$CATALINA_BASE/webapps, which is why the referenced documentation
tells you to move Tomcat's existing from the webapps directory and
back them up somewhere.

==================

> This block repeats itself for every website i've configured and
> where the railo directory gets deployed. This takes like around 40
> seconds..what it is doing or for what is it needed?
> 
> regards,
> 
> René

So, try the following:

1. move all of the standard applications in $CATALINA_BASE/webapps to
   someplace else
2. Make a new directory in $CATALINA_BASE/webapps, and call it app1
   (for fun)
3. Remove the leading {web-root-directory} in your configuration

Start up Tomcat and see what you get.

Come back and tell us what happened. I'm guessing that you'll only get
one generated WEB-INF directory (under $CATALINA_BASE/webapps/app1).
The initial startup may be slow (it has to copy about 2 MB of
material), but subsequent startups should be OK.

The way that the reference documentation does things makes Tomcat
upgrades painful. Once you've tried this, come back and we can give
you pointers on how to set things up to integrate Railo AND make
upgrades tolerable.

. . . . just my (no coffee yet) 2 cents
/mde/

> 
> 
> On Thu, Aug 14, 2014 at 3:01 PM, Rene Scheffler
> <rene.scheff...@pixeltex.com
>> wrote:
> 
>> Hey André, first i want to say thanks for that big followup. I've
>> read through all this and some points were clear to me
>> before..but now as i see your points..i only use tomcat for
>> CFML/railo and nginx for delivering static files. So when i got
>> my website project in the directory /mnt/webroot/sites/blabla for
>> example, i don't need the to put anything in the
>> /opt/tomcat/webapps directory right? I've started to sort out all
>> things of the global server.xml and web.xml so we have more
>> control over it and put it into the website specific web.xml.
>> 
>> regards, René
>> 
>> 
>> On Thu, Aug 14, 2014 at 1:54 PM, André Warnier <a...@ice-sa.com>
>> wrote:
>> 
>>> Rene Scheffler wrote:
>>> 
>>>> Hey guys,
>>>> 
>>>> i just added "some" entries to the default web.xml and
>>>> server.xml.
>>>> 
>>> [...] I do not have a lot of time today, so I'll let someone
>>> else pick apart what you did, and maybe try to figure out why
>>> what you did created WEB-INF directories all over the place.
>>> 
>>> But there are a few general principles in Tomcat, which are not
>>> always very explicit in the standard documentation (*), but
>>> which are quite important nevertheless, to understand how it
>>> works.
>>> 
>>> (*) they are there if you know where to look, but it takes a
>>> while before you get to that point.
>>> 
>>> 1) whatever you put in server.xml is really "top-level" with
>>> Tomcat. That file is read only when Tomcat starts, so whatever
>>> you put in there is static, and cannot be undone later (unless
>>> you reboot Tomcat). So the general idea is : you should only
>>> put there what really needs to be there, and not more.  For
>>> example, Host's need to be there, but anything to do with web
>>> applications (or "webapps" or "contexts") is better defined 
>>> somewhere else.
>>> 
>>> 2) Similarly, the generic conf/web.xml applies to *all* web
>>> applications running under your Tomcat. (it is merged with the
>>> individual web.xml's of each web application, before these
>>> applications are started). So there also, you should use
>>> caution when modifying it, because whatever you change will
>>> probably have far-reaching side-effects. And of course also
>>> because to undo what's in there, you need to restart the whole
>>> Tomcat.
>>> 
>>> 3) when Tomcat starts, it scans its /webapps directory, and
>>> takes note of any sub-directory that it finds there (and also
>>> any WAR file, but let's leave this for later). In the absence
>>> of any further instructions, each of these sub-directory names
>>> becomes the name of a webapp, and that is later used by Tomcat
>>> to "map" a URL received by Tomcat, to one of these webapps. So
>>> for example is a client sends a request for
>>> "http://yourhost/name1/*";, Tomcat is going to look for a webapp
>>> named "name1", and if it finds it, it will pass the request to
>>> that webapp for processing. And if Tomcat does not find a
>>> webapp named "name1", then it will pass the request to its
>>> "default webapp", the one named "ROOT" (located in 
>>> /webapps/ROOT/).
>>> 
>>> 4) Once Tomcat has delegated the processing of a request to a
>>> specific webapp, another level of mapping takes place inside of
>>> that webapp, using the rest of the request URL (the part after
>>> "http://hostname/name1/...";. That's where the "url-mapping"
>>> elements, in the WEB-INF/web.xml of that webapp, enter in
>>> play. If Tomcat finds a mapping that matches one of the
>>> webapp's servlets, then that servlet will be called to process
>>> the request. If no specific mapping is found, then Tomcat will
>>> pass the request to the "default servlet" of that webapp (which
>>> is built-in in Tomcat, and automatically added to each webapp).
>>> (That is the servlet which just returns a static document from
>>> the filesystem).
>>> 
>>> So, I don't know CFML at all, and I don't know if this is the
>>> kind of application which wants to take over your whole Tomcat,
>>> and not leave anything to decide by any other webapp. But if it
>>> is not your intention to let CFML take over you whole Tomcat, 
>>> then you should not make those changes in the general web.xml,
>>> but make them in the WEB-INF/web.xml *of your CFML webapp*, and
>>> not at any higher level.
>>> 
>>> And similarly, if there are things that need to be specified in
>>> the <Context> of your webapp, these things should normally go
>>> in ../webapps/yourwebapp/META-INF/context.xml, and not in the
>>> general server.xml.
>>> 
>>> And maybe read the page : 
>>> https://tomcat.apache.org/tomcat-7.0-doc/deployer-howto.html 
>>> (although it is not for the faint of heart) and particularly
>>> the section "A word on Contexts".
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>>
>>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>> 
>>> 
>> 
>> 
>> --
>> 
>> René Scheffler
>> 
>> Auszubildender
>> 
>> Fon:    +49 30 609 8790 14 Office: +49 30 609 8790 0 Mobil:  +49
>> 176 207 970 42
>> 
>> 
>> E-Mail: rene.scheff...@pixeltex.com
>> 
>> Internet: http://www.PIXELTEX.com <http://www.pixeltex.com/>
>> 
>> 
>> PIXELTEX GmbH, Albrechtstrasse 18, 10117 Berlin, Germany
>> 
>> Registergericht: Amtsgericht Charlottenburg, HRB 142440 B
>> 
>> Geschäftsführer: Louis Brauer
>> 
>> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (MingW32)

iQEcBAEBAgAGBQJT7NWBAAoJEEFGbsYNeTwth1UH/2GbK5atwH31bkYQGBAqtA5a
xEAPnKFg4FCpRTkjB1AOql57p5lLu6As18EMELLotkpr6jsrNWIWTEH96DuNpJLr
A2dKNaC/+CRGppfV6l3MEicVzCJBQDoCD13P/w0Yn3Jc4bb1Z3bo/UUOc1ER39GW
uN2uPcaxknyUZd23hRcfYNTmxOmwRAqAZ8dgIqMPjWFb+nxkypO5+Nx+lS1rxPYx
sySdcyE7cJCi4c4pPnyYzEmbbVq5MT6Pd1RIXU4onbnNc476hrD6gCXBNkkXs97i
U9nQYBhcprkHP5Fmk+6tupZHdps8b+JdTXdvZqI6e090J55gJEFhLXJuX0Nd7BU=
=Yo1Z
-----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