0

I have the following Jetty config:

<webAppConfig>
   <defaultsDescriptor>${project.basedir}/configuration/webdefaults.xml</defaultsDescriptor>
   <contextPath>/app</contextPath>
   <baseResource implementation="org.eclipse.jetty.util.resource.ResourceCollection">
      <resourcesAsCSV>${project.basedir}/src/main/webapp,/external/dir,/another/dir</resourcesAsCSV>
   </baseResource>
</webAppConfig>

Now, both in my src/main/webapp and in /external/dir, I have a directory called static, and resources from both are accessible through URL /app/static just fine. Yet, in /another/dir, I have a directory that is called special-static and for some reason, resources in it are not accessible (or at least not using URL /app/special-static).

Any idea what I might be doing wrong?

kaqqao
  • 12,984
  • 10
  • 64
  • 118

2 Answers2

0

The xml entry ...

<resourcesAsCSV>dir1,dir2,dir3</resourcesAsCSV>

Takes [C]omma [S]eparated [V]alues, use "," not ";" in your configuration.

Joakim Erdfelt
  • 46,896
  • 7
  • 86
  • 136
  • Actually, it works with both. But anyway, switching to commas does not help, I've just tried it :( Also, I'll amend the question. – kaqqao Mar 29 '13 at 10:09
0

What version do you use?

With version 8 or 9, I would do something like:

 <webAppConfig>
  ...
  <resourceBases>
   <resourceBase>${project.basedir}/src/main/webapp</resourceBase>
   <resourceBase>/external/dir</resourceBase>
   <resourceBase>/another/dir</resourceBase>
  </resourceBases>
 </webAppConfig>

If you are using an outdated version (6 or 7), I encourage you to upgrade to the latest version 8.

halfer
  • 19,824
  • 17
  • 99
  • 186
benweet
  • 3,685
  • 1
  • 21
  • 26