You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Leo Donahue - RDSA IT <Le...@mail.maricopa.gov> on 2013/07/16 00:08:08 UTC

Tomcat 8 Resources - webAppMount

Is this saying that one can mount a directory under WEB-INF with a custom path?  

One of my biggest struggles with JSF page navigation is placing resources under WEB-INF and then figuring out how to navigate from a page that was forwarded to WEB-INF and that page under WEB-INF also needs to forward to another page in WEB-INF.

The JSF navigation is usually one page behind the current page unless you explicitly redirect, which you can't do if the resource is in WEB-INF, so I end up with a 404 trying to forward from page1 in WEB-INF to page2 in WEB-INF.  The only solution I see is exposing the last page in the root of the context or ditch the JSF framework and go back to straight servlets.

This new feature sounds like it would help, but wouldn't it defeat the purpose of placing resources in WEB-INF?

Leo

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


Re: Tomcat 8 Resources - webAppMount

Posted by Mark Thomas <ma...@apache.org>.
On 16/07/2013 08:42, André Warnier wrote:
> Mark Thomas wrote:
>> On 15/07/2013 23:08, Leo Donahue - RDSA IT wrote:
>>> Is this saying that one can mount a directory under WEB-INF with a
>>> custom path?
>>
>> You could but I haven't tested it so I'm not sure what the consequences
>> would. The features were written with the following scenario in mind.
>>
>> /var
>>   /shared
>>   /tomcat
>>     /webapps
>>       /app1
>>         /WEB-INF
>>       /app2
>>         /WEB-INF
>>
>>
>> The idea is that you can mount /var/shared at some arbitrary (and
>> potentially different for each webapp) path inside the webapps.
>>
>> You can also mount individual files and JARs of files.
> 
> So this is somewhat similar to the Linux "mount -bind" option (but only
> as seen by the Tomcat webapps) ?
> Is that "mountpoint" read-only ?

JARs are read only but mounted directories can be read-write. There is
no configuration to control this (at the moment) just file permissions.

Mark



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


Re: Tomcat 8 Resources - webAppMount

Posted by André Warnier <aw...@ice-sa.com>.
Mark Thomas wrote:
> On 15/07/2013 23:08, Leo Donahue - RDSA IT wrote:
>> Is this saying that one can mount a directory under WEB-INF with a
>> custom path?
> 
> You could but I haven't tested it so I'm not sure what the consequences
> would. The features were written with the following scenario in mind.
> 
> /var
>   /shared
>   /tomcat
>     /webapps
>       /app1
>         /WEB-INF
>       /app2
>         /WEB-INF
> 
> 
> The idea is that you can mount /var/shared at some arbitrary (and
> potentially different for each webapp) path inside the webapps.
> 
> You can also mount individual files and JARs of files.

So this is somewhat similar to the Linux "mount -bind" option (but only as seen by the 
Tomcat webapps) ?
Is that "mountpoint" read-only ?



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


Re: Tomcat 8 Resources - webAppMount

Posted by Mark Thomas <ma...@apache.org>.
On 15/07/2013 23:08, Leo Donahue - RDSA IT wrote:
> Is this saying that one can mount a directory under WEB-INF with a
> custom path?

You could but I haven't tested it so I'm not sure what the consequences
would. The features were written with the following scenario in mind.

/var
  /shared
  /tomcat
    /webapps
      /app1
        /WEB-INF
      /app2
        /WEB-INF


The idea is that you can mount /var/shared at some arbitrary (and
potentially different for each webapp) path inside the webapps.

You can also mount individual files and JARs of files.

> One of my biggest struggles with JSF page navigation is placing
> resources under WEB-INF and then figuring out how to navigate from a
> page that was forwarded to WEB-INF and that page under WEB-INF also
> needs to forward to another page in WEB-INF.
> 
> The JSF navigation is usually one page behind the current page unless
> you explicitly redirect, which you can't do if the resource is in
> WEB-INF, so I end up with a 404 trying to forward from page1 in
> WEB-INF to page2 in WEB-INF.  The only solution I see is exposing the
> last page in the root of the context or ditch the JSF framework and
> go back to straight servlets.

I don't know JSF well enough to really help but I would expect a forward
relative to the context root to work i.e. /WEB-INF/jsps/my.jsp

> This new feature sounds like it would help, but wouldn't it defeat
> the purpose of placing resources in WEB-INF?

The feature is aimed at mounting external content at a path within the
web application. My fear is mounting an internal path could lead to
infinite loops and the like but I haven't reviewed the code or tested
anything to see how valid that fear is.

Mark

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