1


I have a webapp that is actually a symlink named: App-0.0.1-SNAPSHOT and it is working fine.

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 solution?
thanks

fatnjazzy
  • 6,070
  • 12
  • 57
  • 83

2 Answers2

3

I 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.

Tom Saleeba
  • 4,031
  • 4
  • 41
  • 36
1

For security reasons, by default Tomcat does not follow symlinks. You may be able to configure it to do so -- see this article.

Community
  • 1
  • 1
jarmod
  • 71,565
  • 16
  • 115
  • 122