title: How can I serve static resources from outside a war on WildFly
body: <p>I may be wrong, but to my understanding, the following must be possible in WildFly:</p>
  
  <p>It must be possible to put a link into my JSF views (i. e. the xhtml files) to a resource (pdf, image, other xhtml file) that is already on the WildFly server.</p>
  
  <p>I can do the same thing in php and an apache server.</p>
  
  <p>Where would I need to put those resources and how can I access them from my views? E. g. put a link in the view to a pdf file that opens the pdf file in a new tab.</p>
  
  <p>Thanks a lot for tips and hints!!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>standalone.xml</p>
  
  <pre><code>&lt;server name="default-server"&gt;
      &lt;http-listener name="default" socket-binding="http" max-post-size="974247881"/&gt;
      &lt;host name="default-host" alias="localhost"&gt;
          &lt;location name="/" handler="welcome-content"/&gt;
          &lt;location name="/content" handler="ContentDir"/&gt;
          &lt;filter-ref name="server-header"/&gt;
          &lt;filter-ref name="x-powered-by-header"/&gt;
      &lt;/host&gt;
  &lt;/server&gt;
  &lt;servlet-container name="default"&gt;
      &lt;jsp-config/&gt;
      &lt;websockets/&gt;
  &lt;/servlet-container&gt;
  &lt;handlers&gt;
      &lt;file name="welcome-content" path="${jboss.home.dir}/welcome-content"/&gt;
      &lt;file name="ContentDir" path="${jboss.home.dir}/standalone/data/unzipped" directory-listing="true"/&gt; 
  &lt;/handlers&gt;
  </code></pre>
  
  <p>link in JSF view</p>
  
  <pre><code>&lt;h:outputLink value="http://localhost:8181/content"&gt;KLICK&lt;/h:outputLink&gt;
  </code></pre>
  
  <p>When I click on this, I get the directory listing, as you said.</p>
  
  <p>But how can I make it so that the <code>index.xhtml</code> in the directory that <code>content</code> points to is displayed?? That's really what I want.</p>
  
  <p><code>content</code> points to <code>${jboss.home.dir}/standalone/data/unzipped</code> and in unzipped there is an <code>index.xhtml</code> as well as another folder with more <code>.xhtml</code> files.</p>
  
  <p>In the <code>index.xhtml</code> there are relative links to the <code>.xhmtl</code> files in the folder:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;&lt;a href="t/rt.html"&gt;hg&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="t/tert.html"&gt;jghj&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="t/gf.html"&gt;jghj&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="t/hg.html"&gt;jghj&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="t/hgfh.html"&gt;jghj&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="t/hfgh.html"&gt;jhgj&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="t/hfgh.html"&gt;jhgj&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="t/hg.html"&gt;jghj&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="t/hghh.html"&gt;jghj&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I want to display the <code>index.xhtml</code> file in <code>unzipped</code> and from there navigate to the other <code>.xhtml</code> files.</p>
  
  <p>Something like that must be possible, must not it??</p>
  
  <p>Or how else would you write an application where a user can upload html files to a Java ee server and then see those files displayed?</p>