Sunday, 19 October 2014

Jetty: How to allow my Deployable Descriptor XML file to access my user folder



My Jetty deployable descriptor XML can't access my Windows user folder.


I have Jetty 9 running ok as http://ift.tt/1CC1D7q.


I have an xml deployable descriptor file at C:\opt\myappbase\webapps\deployable.xml:



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC
"-//Mort Bay Consulting//DTD Configure//EN"
"http://ift.tt/1ssfmdx">

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="war">C:/Users/Me</Set>
<Set name="contextPath">/</Set>
</Configure>


Upon launching 127.0.0.1:8080 in the browser I get:



HTTP ERROR 500

Problem accessing /. Reason:

Server Error
Caused by:

org.eclipse.jetty.util.resource.FileResource$1
at org.eclipse.jetty.util.resource.FileResource.addPath(FileResource.java:207)
...


When I change C:\Users\Me to C:\Users\Public it finds the directory OK.


How do I grant Jetty access to my ordinary Windows user folder?


No comments:

Post a Comment