In most nodes, the /usr/share/tomcat7/lib directory exists and placing a jar inside that works fine.
But on few nodes, instead of that directory, there is a symlink to /usr/share/java/tomcat7 exist. So create a file inside the directory /usr/share/tomcat7/lib fails.
How do I create the file in the correct directories based on the symlinks.
1) If symlink exists, create jar files in the linked folder(eg: /usr/share/java/tomcat7)
2) If there's no symlink and just a direct directory, create the file in that directory(eg: /usr/share/tomcat7/lib)
Please provide examples.
node1:mydata/myfolder #ls -lah /usr/share/tomcat7/lib
lrwxrwxrwx 1 root root 23 Aug 17 15:44 /usr/share/tomcat7/lib -> /usr/share/java/tomcat7
Thanks in advance.
P.S: I found some links => manage examples in the web, but not sure how to add both test cases together to bring up an optimum solution.
↧