You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Narahari 'n' Savitha <sa...@gmail.com> on 2018/02/01 21:35:49 UTC
tomcat web-inf/lib and soft links, how to make them live happy
Friends:
I am sure the experts here have stumbled on this. So please help.
I have an app where I have
myapp
|_WEB-INF/lib/gson-2.3.1.jar
When I start tomcat it works fine.
NOw I do this
cd webapps/myapp/WEB-INF/lib
ln -s ../../../thejars/gson-2.3.1.jar gson-2.3.1.jar
I then restart tomcat and the error comes up like this
java.io.IOException: Failed to access resource /WEB-INF/lib/gson-2.3.1.jar
so if I do a SOFT link in linux the app wont start.
On the other hand if I do a HARD link the app comes up fine.
Any ideas ?
Re: tomcat web-inf/lib and soft links, how to make them live happy
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Narahari,
On 2/1/18 5:07 PM, Narahari 'n' Savitha wrote:
> I think I found the solution. Putting it here for comopleteness.
>
> In the $CATALINA_BASE/conf/context.xml file add the following to
> the Context tag aka
>
> It looked like this before <Context
> sessionCookieName="JSESSIONID_PAAS" swallowOutput="true"
> useHttpOnly="true" >
>
> and now it looks like
>
> <Context allowLinking="true" sessionCookieName="JSESSIONID_PAAS"
> swallowOutput="true" useHttpOnly="true" >
>
> See that allowLinking attribute. Once I set it up, I am good to
> go.
Why not simply bundle the JAR file with your application?
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlpz4RUACgkQHPApP6U8
pFgHQBAAlkt3Pr0g0Y8thq4xcuy7+JSUE4D9iQatCgIWouJhVq1NOEaENUxQIQkD
+J9BqWXh9OgTKwC8mbNcCd9+NAf1l4wVT3SZq3SCEKA7F9NYjyOBEOtEPnN8l+pT
libHZN6+RGG4e6nc8RT1lOEXhavc2dIyxEtoNdj/HRBl3/YOqCcHN5sAaS7HfBhy
Fxa6okAsZymk1NxMnBvsNPz09ziQ8NIcVFmxwpCEtPLdMuHvvsMGLZ3PUsYEe8wF
+AwOz08sztVstK3182/+XEOQbav56hM7qtzaUP9yHLYE6MJULIDZf5zkRahBRbMQ
XDGnlV0Ha+MbCVGInY+sgpuW6zYqn3rP9iLYPFRiFaXoblg0BeDwnDxKvjQFV9kL
qE+PVxc7dOQ3OX6ua+CZL/eBsYvuDpP5K92vp8ai1yP5bv1CeLrILPiXOKCfDF5x
w/HNaeJH+6ZcKTxZWo2ClPvxZJf+FQ0YCWWkpdREmXYyK3h1ku4iikQP6dcUDguD
83Y+IEzwJeTQH6B6H2Hojt3ssaV1+tLocYAQmvoprWgqtY0d4bf4cSRBHf4VytE8
CIAFKwf5qSSlBwIOb25A8MEXN81i66dFclebmqUgB2ZK37baaDqYCXDHgO2A/sM6
EtdOeF9xmmbPUmx/7n0a62mX9vfG5DWy/0mm1pdIavCx+VViDAw=
=2jNc
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat web-inf/lib and soft links, how to make them live happy
Posted by Narahari 'n' Savitha <sa...@gmail.com>.
I think I found the solution. Putting it here for comopleteness.
In the $CATALINA_BASE/conf/context.xml file add the following to the
Context tag aka
It looked like this before
<Context sessionCookieName="JSESSIONID_PAAS" swallowOutput="true"
useHttpOnly="true" >
and now it looks like
<Context allowLinking="true" sessionCookieName="JSESSIONID_PAAS"
swallowOutput="true" useHttpOnly="true" >
See that allowLinking attribute. Once I set it up, I am good to go.
-Narahari
On Thu, Feb 1, 2018 at 4:35 PM, Narahari 'n' Savitha <sa...@gmail.com>
wrote:
> Friends:
>
> I am sure the experts here have stumbled on this. So please help.
>
> I have an app where I have
>
> myapp
> |_WEB-INF/lib/gson-2.3.1.jar
>
> When I start tomcat it works fine.
>
> NOw I do this
>
> cd webapps/myapp/WEB-INF/lib
>
> ln -s ../../../thejars/gson-2.3.1.jar gson-2.3.1.jar
>
> I then restart tomcat and the error comes up like this
>
> java.io.IOException: Failed to access resource /WEB-INF/lib/gson-2.3.1.jar
>
> so if I do a SOFT link in linux the app wont start.
>
> On the other hand if I do a HARD link the app comes up fine.
>
> Any ideas ?
>
>