Domanda


Ho una webapp che è in realtà un link simbolico di nome: App-0.0.1-SNAPSHOT e sta funzionando benissimo.

Ora, invece di che, voglio creare la cartella App-0.0.1-SNAPSHOT e utilizzare i link simbolici nelle sottodirectory.
Voglio che il WEB-INF creare un collegamento a un unico luogo.
E voglio i file del client (js / e / CSS) per collegamento a un altro luogo.
In questo caso sto ottenendo 404.
Questo articolo è in realtà facendo la stessa cosa, ma per qualche reasong i cant farlo fare .. ..

Anche in questo caso, il collegamento alla cartella principale webapp funziona bene.

Potreste suggerire una soluzione?
grazie

È stato utile?

Soluzione

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

Altri suggerimenti

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top