Question


J'ai une webapp qui est en fait un lien symbolique nommé: App-0.0.1-SNAPSHOT et il fonctionne très bien.

Maintenant, au lieu de cela, je veux créer le dossier App-0.0.1-SNAPSHOT et utiliser les liens symboliques dans les sous-répertoires.
Je veux que le WEB-INF de lien vers un seul endroit.
Et je veux que les fichiers clients (/ js et / CSS), lien vers un autre endroit.
Dans ce cas, je reçois 404.
Cet article est en train de faire la même chose, mais pour certains reasong je ne peux pas l'obtenir fait .. ..

Encore une fois, un lien vers le dossier racine de webapp fonctionne très bien.

Pouvez-vous suggérer une solution?
merci

Était-ce utile?

La solution

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

Autres conseils

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top