Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] skipping the leading slash of a context

You can achieve this by deploying your HTML file under root (/). Or you can create a redirect filter/servlet under /ABC to redirect everything under /ABC/lib/one/ to /lib/one.

On May 4, 2012 3:44 PM, "Dobrin Alexiev" <dob8882@xxxxxxxxx> wrote:

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="">

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="" 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

Dobrin


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top