Re: jar file sin WEB-INF/lib soft linked and error
"Narahari 'n' Savitha" <[email protected]> Thu, 1 Feb 2018 17:07:06 -0500
| Newsgroups | gmane.org.user-groups.ajug.members |
|---|---|
| Message-ID | <CALCrukiVOniWnFNJyQKqgVuX=8q_zzJ_M2NrYN+Qf8PUJym8jw@mail.gmail.com> |
--===============0696997197798872443== Content-Type: multipart/alternative; boundary="001a1143c7b00e46b105642dd1e5" --001a1143c7b00e46b105642dd1e5 Content-Type: text/plain; charset="UTF-8" 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:22 PM, Narahari 'n' Savitha <[email protected]> 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 ? > > -N > --001a1143c7b00e46b105642dd1e5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">I think I found the solution.=C2=A0 Putting it here for co= mopleteness.<div><br></div><div>In the $CATALINA_BASE/conf/context.xml file= add the following to the Context tag aka</div><div><br></div><div>It looke= d like this before</div><div><Context=C2=A0 sessionCookieName=3D"JS= ESSIONID_PAAS" swallowOutput=3D"true" useHttpOnly=3D"tr= ue" ><br></div><div><br></div><div>and now it looks like=C2=A0</div= ><div><br></div><div><Context allowLinking=3D"true" sessionCoo= kieName=3D"JSESSIONID_PAAS" swallowOutput=3D"true" useH= ttpOnly=3D"true" ><br></div><div><br></div><div>See that allow= Linking attribute.=C2=A0 Once I set it up, I am good to go.</div><div><br><= /div><div>-Narahari</div><div class=3D"gmail_extra"><br><div class=3D"gmail= _quote">On Thu, Feb 1, 2018 at 4:22 PM, Narahari 'n' Savitha <span = dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">sa= [email protected]</a>></span> wrote:<br><blockquote class=3D"gmail_quote= " style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><= div dir=3D"ltr">Friends:<div><br></div><div>I am sure the experts here have= stumbled on this.=C2=A0 So please help.</div><div><br></div><div>I have an= app where I have</div><div><br></div><div>myapp</div><div>=C2=A0 =C2=A0|_W= EB-INF/lib/<span style=3D"color:rgb(34,34,34);font-family:arial,sans-serif;= font-size:small;font-style:normal;font-variant-ligatures:normal;font-varian= t-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-i= ndent:0px;text-transform:none;white-space:normal;word-spacing:0px;backgroun= d-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-colo= r:initial;float:none;display:inline">gson-2.3.1.jar</span></div><div><br></= div><div>When I start tomcat it works fine.</div><div><br></div><div>NOw I = do this</div><div><br></div><div>cd=C2=A0 webapps/myapp/WEB-INF/lib</div><d= iv><br></div><div>ln -s ../../../thejars/<span style=3D"color:rgb(34,34,34)= ;font-family:arial,sans-serif;font-size:small;font-style:normal;font-varian= t-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:= normal;text-align:start;text-indent:0px;text-transform:none;white-space:nor= mal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-styl= e:initial;text-decoration-color:initial;float:none;display:inline">gson-2.3= .1.<wbr>jar=C2=A0<span style=3D"color:rgb(34,34,34);font-family:arial,sans-= serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-= variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;= text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;bac= kground-color:rgb(255,255,255);text-decoration-style:initial;text-decoratio= n-color:initial;float:none;display:inline">gson-2.3.1.jar</span></span></di= v><div><br></div><div>I then restart tomcat and the error comes up like thi= s</div><div><br></div><div>java.io.IOException: Failed to access resource /= WEB-INF/lib/gson-2.3.1.jar<br></div><div><br></div><div>so if I do a SOFT l= ink in linux the app wont start.</div><div><br></div><div>On the other hand= if I do a HARD link the app comes up fine.</div><div><br></div><div>Any id= eas ?</div><span class=3D"HOEnZb"><font color=3D"#888888"><div><br></div><d= iv>-N</div></font></span></div> </blockquote></div><br></div></div> --001a1143c7b00e46b105642dd1e5-- --===============0696997197798872443== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KYWp1Zy1tZW1i ZXJzIG1haWxpbmcgbGlzdAphanVnLW1lbWJlcnNAbGlzdHMuYWp1Zy5vcmcKTWFuYWdlIHlvdXIg c3Vic2NyaXB0aW9uIGFuZCB1bnN1YnNjcmliZSBodHRwOi8vbGlzdHMuYWp1Zy5vcmcvbWFpbG1h bi9saXN0aW5mby9hanVnLW1lbWJlcnM= --===============0696997197798872443==--