[jetty-users] skipping the leading slash of a context

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jetty-users] skipping the leading slash of a context

Dobrin Alexiev

I am new to jetty.

I am trying to organize my webapps and at the same time reuse javascript files that are common between these apps.

I have a WebAppContext that I point to a folder "C:/FolderABC" and assign a context path "/ABC”.

I have a javascript file "xyz.js" in unrelated folder "D:\folder1\libXYZ".

Can a HTML from the "ABC" context reference JS files from my another folder (D:\folder1\libXYZ) by specifying:


<script type="text/javascript" src="lib/one/xyz.js"></script>

Note that I don't have "/" in front of "lib" in the "src" attribute.


If I create another WebAppContext with context "/lib/one" and change the HTML file to "src="/lib/one/xyz.js" it works, but I am looking to see if can leave the "src" attribute without the leading slash.

Basically I am trying to work around a tool limitation and see if I can leave the tool generated line "lib/one/xyz.js" and find a solution on the web server side instead.

 Thanks in advance


jetty-users mailing list
[hidden email]