Now instead of that, i want to create the folder App-0.0.1-SNAPSHOT and use the symlinks in the subdirectories.
I want the WEB-INF to link to one place. And i want the Client files (/js and /css) to link to another place. In this case i am getting 404. This article is actually doing the same, but for some reasong i cant get it done....Again, linking to the webapp root folder works fine.
Can you suggest a solut开发者_运维百科ion?
thanksI found that using the command sudo mount --bind olddir newdir
gets me out of trouble. If you don't have root access then this won't work for you. See mount --help
or man mount
for some more info on binding but it basically mounts one directory on top of another so it has the same affect as a symlink but it gets around tomcat's limitation with symlinks.
In your example, you'd probably want something like sudo mount --bind /path/to/your/sandbox/js /var/lib/tomcat7/webapps/App-0.0.1-SNAPSHOT/js
and then similar for the css
directory.
For security reasons, by default Tomcat does not follow symlinks. You may be able to configure it to do so -- see this article.
精彩评论