I have a folder outside war /temp/mydata and I want static servlet read
files from this folder when web context is /static/filestorage.
Besides I have other not default servlets, for example 5 servlets. And I
need them also to work.
I've found solution in internet:
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="handler">
<New id="Handlers"
class="org.eclipse.jetty.server.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<Set name="handler">
<New
class="org.eclipse.jetty.servlet.ServletContextHandler">
<Set
name="contextPath">/static/filestorage</Set>
<Set name="handler">
<New
class="org.eclipse.jetty.server.handler.ResourceHandler">
<Set
name="resourceBase">/temp/mydata</Set>
</New>
</Set>
</New>
</Set>
</Item>
</Array>
</Set>
</New>
</Set>
</Configure>
However, it throws Config error at [Set:null] exception - BTW - what does
it mean????. I have tried different ways to make arrays of handlers but the
same result.
is it possible?
The following code works, but only static content from /temp/data. Other 5
servlets don't work. How to solve such problem?
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="handler">
<New class="org.eclipse.jetty.servlet.ServletContextHandler">
<Set name="contextPath">/static/filestorage</Set>
<Set name="handler">
<New class="org.eclipse.jetty.server.handler.ResourceHandler">
<Set name="resourceBase">/temp/mydata</Set>
</New>
</Set>
</New>
</Set>
</Configure>
--
--
------------------
OPS4J - http://www.ops4j.org - [email protected]
---
You received this message because you are subscribed to the Google Groups
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.