You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Srikanth Hugar <sr...@gmail.com> on 2014/09/22 10:11:43 UTC
ContextHandler in jetty.xml with karaf 3.0.0
Hello,
I get below exception when i try to use ContextHandler in jetty.xml in
karaf 3.0.0. What could be the problem?
Same configuration works if i run jetty independently outside karaf.
*Exception*
12:40:32.641 [FelixStartLevel] ERROR o.o.p.w.e.w.internal.WebApplication
- Registration skipped for
[ServletWebElement{mapping=DefaultServletMapping{httpContextId=null,urlPatterns=null,initParams={},servlet=org.apache.cxf.transport.servlet.CXFNonSpringServlet@31640c79,
alias=/css, servletNameSharingServer}}] due to error during registration
java.lang.IllegalStateException: STARTED
at
org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:80)
~[na:na]
at
org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:282)
~[na:na]
at
org.eclipse.jetty.servlet.ServletContextHandler.<init>(ServletContextHandler.java:150)
~[na:na]
at
org.eclipse.jetty.servlet.ServletContextHandler.<init>(ServletContextHandler.java:116)
~[na:na]
at
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.<init>(HttpServiceContext.java:110)
~[na:na]
at
org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:237)
~[na:na]
at
org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:171)
~[na:na]
at
org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:152)
~[na:na]
at
org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:203)
~[na:na]
*ContextHandler configuration*
<Set name="handler">
<New id="Handlers"
class="org.eclipse.jetty.server.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<New id="Contexts"
class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
<Set name="handlers">
<Array type="org.eclipse.jetty.server.handler.ContextHandler">
<Item>
<New id="ContextHandler"
class="org.eclipse.jetty.server.handler.ContextHandler">
<Set name="contextPath">/docs</Set>
<Set name="handler">
<New
class="org.eclipse.jetty.server.handler.ResourceHandler">
<Set
name="directoriesListed">true</Set>
<Set
name="resourceBase">E:/opt/css/</Set>
<Set
name="welcomeFiles">
<Array type="String">
<Item>index.html</Item>
</Array>
</Set>
<Set
name="cacheControl">max-age=3600,public</Set>
</New>
</Set>
</New>
</Item>
</Array>
</Set>
</New>
</Item>
<Item>
<New id="DefaultHandler"
class="org.eclipse.jetty.server.handler.DefaultHandler"/>
</Item>
</Array>
</Set>
</New>
</Set>
--
Srikanth
www. <http://www.srikanthugar.in>gharki.com
Re: ContextHandler in jetty.xml with karaf 3.0.0
Posted by Srikanth Hugar <sr...@gmail.com>.
hhhmmm, thanks.
Found similar question at http://www.sluse.com/view/10860809
But nobody answered :-)
I will see what could be done, meanwhile if anybody find any solution,
please let me know.
Thanks.
On Mon, Sep 22, 2014 at 3:34 PM, Achim Nierbeck <bc...@googlemail.com>
wrote:
> hmm, not sure, might want to try a different defaults servlet, one which
> is actually is registered :D
>
> regards, Achim
>
> 2014-09-22 11:57 GMT+02:00 Srikanth Hugar <sr...@gmail.com>:
>
>> Thanks for quick reply.
>>
>> I tried the solution which you mentioned in block. Now atleast jetty is
>> starting fine.
>>
>>
>> <Get name="handler">
>> <Call name="addHandler">
>> <Arg>
>> <New class="org.eclipse.jetty.servlet.ServletContextHandler">
>> <Set name="contextPath">/docs</Set>
>> <Set name="resourceBase">E:/opt/css/</Set>
>> <Call name="addServlet">
>> <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
>> <Arg>/</Arg>
>> </Call>
>> </New>
>> </Arg>
>> </Call>
>> </Get>
>>
>> But i am not able to browse the directory.
>>
>> Wheni hit the server with URL https://localhost:8081/docs, i have some
>> files in that directory.
>> HTTP ERROR: 404
>>
>> Problem accessing /docs. Reason:
>>
>> Not Found
>>
>> Any other configuration is required?
>>
>>
>>
>>
>>
>> On Mon, Sep 22, 2014 at 2:01 PM, Achim Nierbeck <bc...@googlemail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> please take a look at my blog post [1] about this :)
>>>
>>> regards, Achim
>>>
>>> [1] -
>>> http://notizblog.nierbeck.de/2011/05/adding-additional-servletcontext-in-pax-web/
>>>
>>> 2014-09-22 10:11 GMT+02:00 Srikanth Hugar <sr...@gmail.com>:
>>>
>>>> Hello,
>>>>
>>>> I get below exception when i try to use ContextHandler in jetty.xml
>>>> in karaf 3.0.0. What could be the problem?
>>>> Same configuration works if i run jetty independently outside karaf.
>>>>
>>>> *Exception*
>>>> 12:40:32.641 [FelixStartLevel] ERROR
>>>> o.o.p.w.e.w.internal.WebApplication - Registration skipped for
>>>> [ServletWebElement{mapping=DefaultServletMapping{httpContextId=null,urlPatterns=null,initParams={},servlet=org.apache.cxf.transport.servlet.CXFNonSpringServlet@31640c79,
>>>> alias=/css, servletNameSharingServer}}] due to error during registration
>>>> java.lang.IllegalStateException: STARTED
>>>> at
>>>> org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:80)
>>>> ~[na:na]
>>>> at
>>>> org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:282)
>>>> ~[na:na]
>>>> at
>>>> org.eclipse.jetty.servlet.ServletContextHandler.<init>(ServletContextHandler.java:150)
>>>> ~[na:na]
>>>> at
>>>> org.eclipse.jetty.servlet.ServletContextHandler.<init>(ServletContextHandler.java:116)
>>>> ~[na:na]
>>>> at
>>>> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.<init>(HttpServiceContext.java:110)
>>>> ~[na:na]
>>>> at
>>>> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:237)
>>>> ~[na:na]
>>>> at
>>>> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:171)
>>>> ~[na:na]
>>>> at
>>>> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:152)
>>>> ~[na:na]
>>>> at
>>>> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:203)
>>>> ~[na:na]
>>>>
>>>> *ContextHandler configuration*
>>>> <Set name="handler">
>>>> <New id="Handlers"
>>>> class="org.eclipse.jetty.server.handler.HandlerCollection">
>>>>
>>>> <Set name="handlers">
>>>> <Array type="org.eclipse.jetty.server.Handler">
>>>> <Item>
>>>> <New id="Contexts"
>>>> class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
>>>> <Set name="handlers">
>>>>
>>>> <Array type="org.eclipse.jetty.server.handler.ContextHandler">
>>>>
>>>> <Item>
>>>>
>>>> <New id="ContextHandler"
>>>> class="org.eclipse.jetty.server.handler.ContextHandler">
>>>>
>>>> <Set
>>>> name="contextPath">/docs</Set>
>>>>
>>>> <Set name="handler">
>>>>
>>>> <New
>>>> class="org.eclipse.jetty.server.handler.ResourceHandler">
>>>>
>>>> <Set
>>>> name="directoriesListed">true</Set>
>>>>
>>>> <Set
>>>> name="resourceBase">E:/opt/css/</Set>
>>>>
>>>> <Set
>>>> name="welcomeFiles">
>>>>
>>>> <Array
>>>> type="String">
>>>>
>>>>
>>>> <Item>index.html</Item>
>>>>
>>>> </Array>
>>>>
>>>> </Set>
>>>>
>>>> <Set
>>>> name="cacheControl">max-age=3600,public</Set>
>>>>
>>>> </New>
>>>>
>>>> </Set>
>>>>
>>>> </New>
>>>>
>>>> </Item>
>>>>
>>>> </Array>
>>>> </Set>
>>>>
>>>>
>>>> </New>
>>>> </Item>
>>>> <Item>
>>>> <New id="DefaultHandler"
>>>> class="org.eclipse.jetty.server.handler.DefaultHandler"/>
>>>> </Item>
>>>> </Array>
>>>> </Set>
>>>> </New>
>>>> </Set>
>>>> --
>>>> Srikanth
>>>> www. <http://www.srikanthugar.in>gharki.com
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> Apache Member
>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
>>> & Project Lead
>>> blog <http://notizblog.nierbeck.de/>
>>>
>>> Software Architect / Project Manager / Scrum Master
>>>
>>>
>>
>>
>> --
>> Srikanth
>> www.srikanthugar.in
>>
>>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
>
> Software Architect / Project Manager / Scrum Master
>
>
--
Srikanth
www.srikanthugar.in
Re: ContextHandler in jetty.xml with karaf 3.0.0
Posted by Achim Nierbeck <bc...@googlemail.com>.
hmm, not sure, might want to try a different defaults servlet, one which is
actually is registered :D
regards, Achim
2014-09-22 11:57 GMT+02:00 Srikanth Hugar <sr...@gmail.com>:
> Thanks for quick reply.
>
> I tried the solution which you mentioned in block. Now atleast jetty is
> starting fine.
>
>
> <Get name="handler">
> <Call name="addHandler">
> <Arg>
> <New class="org.eclipse.jetty.servlet.ServletContextHandler">
> <Set name="contextPath">/docs</Set>
> <Set name="resourceBase">E:/opt/css/</Set>
> <Call name="addServlet">
> <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
> <Arg>/</Arg>
> </Call>
> </New>
> </Arg>
> </Call>
> </Get>
>
> But i am not able to browse the directory.
>
> Wheni hit the server with URL https://localhost:8081/docs, i have some
> files in that directory.
> HTTP ERROR: 404
>
> Problem accessing /docs. Reason:
>
> Not Found
>
> Any other configuration is required?
>
>
>
>
>
> On Mon, Sep 22, 2014 at 2:01 PM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
>
>> Hi,
>>
>> please take a look at my blog post [1] about this :)
>>
>> regards, Achim
>>
>> [1] -
>> http://notizblog.nierbeck.de/2011/05/adding-additional-servletcontext-in-pax-web/
>>
>> 2014-09-22 10:11 GMT+02:00 Srikanth Hugar <sr...@gmail.com>:
>>
>>> Hello,
>>>
>>> I get below exception when i try to use ContextHandler in jetty.xml
>>> in karaf 3.0.0. What could be the problem?
>>> Same configuration works if i run jetty independently outside karaf.
>>>
>>> *Exception*
>>> 12:40:32.641 [FelixStartLevel] ERROR
>>> o.o.p.w.e.w.internal.WebApplication - Registration skipped for
>>> [ServletWebElement{mapping=DefaultServletMapping{httpContextId=null,urlPatterns=null,initParams={},servlet=org.apache.cxf.transport.servlet.CXFNonSpringServlet@31640c79,
>>> alias=/css, servletNameSharingServer}}] due to error during registration
>>> java.lang.IllegalStateException: STARTED
>>> at
>>> org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:80)
>>> ~[na:na]
>>> at
>>> org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:282)
>>> ~[na:na]
>>> at
>>> org.eclipse.jetty.servlet.ServletContextHandler.<init>(ServletContextHandler.java:150)
>>> ~[na:na]
>>> at
>>> org.eclipse.jetty.servlet.ServletContextHandler.<init>(ServletContextHandler.java:116)
>>> ~[na:na]
>>> at
>>> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.<init>(HttpServiceContext.java:110)
>>> ~[na:na]
>>> at
>>> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:237)
>>> ~[na:na]
>>> at
>>> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:171)
>>> ~[na:na]
>>> at
>>> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:152)
>>> ~[na:na]
>>> at
>>> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:203)
>>> ~[na:na]
>>>
>>> *ContextHandler configuration*
>>> <Set name="handler">
>>> <New id="Handlers"
>>> class="org.eclipse.jetty.server.handler.HandlerCollection">
>>>
>>> <Set name="handlers">
>>> <Array type="org.eclipse.jetty.server.Handler">
>>> <Item>
>>> <New id="Contexts"
>>> class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
>>> <Set name="handlers">
>>>
>>> <Array type="org.eclipse.jetty.server.handler.ContextHandler">
>>>
>>> <Item>
>>>
>>> <New id="ContextHandler"
>>> class="org.eclipse.jetty.server.handler.ContextHandler">
>>>
>>> <Set
>>> name="contextPath">/docs</Set>
>>>
>>> <Set name="handler">
>>>
>>> <New
>>> class="org.eclipse.jetty.server.handler.ResourceHandler">
>>>
>>> <Set
>>> name="directoriesListed">true</Set>
>>>
>>> <Set
>>> name="resourceBase">E:/opt/css/</Set>
>>>
>>> <Set
>>> name="welcomeFiles">
>>>
>>> <Array
>>> type="String">
>>>
>>>
>>> <Item>index.html</Item>
>>>
>>> </Array>
>>>
>>> </Set>
>>>
>>> <Set
>>> name="cacheControl">max-age=3600,public</Set>
>>>
>>> </New>
>>>
>>> </Set>
>>>
>>> </New>
>>>
>>> </Item>
>>>
>>> </Array>
>>> </Set>
>>>
>>>
>>> </New>
>>> </Item>
>>> <Item>
>>> <New id="DefaultHandler"
>>> class="org.eclipse.jetty.server.handler.DefaultHandler"/>
>>> </Item>
>>> </Array>
>>> </Set>
>>> </New>
>>> </Set>
>>> --
>>> Srikanth
>>> www. <http://www.srikanthugar.in>gharki.com
>>>
>>>
>>>
>>
>>
>> --
>>
>> Apache Member
>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
>> & Project Lead
>> blog <http://notizblog.nierbeck.de/>
>>
>> Software Architect / Project Manager / Scrum Master
>>
>>
>
>
> --
> Srikanth
> www.srikanthugar.in
>
>
--
Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Software Architect / Project Manager / Scrum Master
Re: ContextHandler in jetty.xml with karaf 3.0.0
Posted by Srikanth Hugar <sr...@gmail.com>.
Thanks for quick reply.
I tried the solution which you mentioned in block. Now atleast jetty is
starting fine.
<Get name="handler">
<Call name="addHandler">
<Arg>
<New class="org.eclipse.jetty.servlet.ServletContextHandler">
<Set name="contextPath">/docs</Set>
<Set name="resourceBase">E:/opt/css/</Set>
<Call name="addServlet">
<Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
<Arg>/</Arg>
</Call>
</New>
</Arg>
</Call>
</Get>
But i am not able to browse the directory.
Wheni hit the server with URL https://localhost:8081/docs, i have some
files in that directory.
HTTP ERROR: 404
Problem accessing /docs. Reason:
Not Found
Any other configuration is required?
On Mon, Sep 22, 2014 at 2:01 PM, Achim Nierbeck <bc...@googlemail.com>
wrote:
> Hi,
>
> please take a look at my blog post [1] about this :)
>
> regards, Achim
>
> [1] -
> http://notizblog.nierbeck.de/2011/05/adding-additional-servletcontext-in-pax-web/
>
> 2014-09-22 10:11 GMT+02:00 Srikanth Hugar <sr...@gmail.com>:
>
>> Hello,
>>
>> I get below exception when i try to use ContextHandler in jetty.xml
>> in karaf 3.0.0. What could be the problem?
>> Same configuration works if i run jetty independently outside karaf.
>>
>> *Exception*
>> 12:40:32.641 [FelixStartLevel] ERROR
>> o.o.p.w.e.w.internal.WebApplication - Registration skipped for
>> [ServletWebElement{mapping=DefaultServletMapping{httpContextId=null,urlPatterns=null,initParams={},servlet=org.apache.cxf.transport.servlet.CXFNonSpringServlet@31640c79,
>> alias=/css, servletNameSharingServer}}] due to error during registration
>> java.lang.IllegalStateException: STARTED
>> at
>> org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:80)
>> ~[na:na]
>> at
>> org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:282)
>> ~[na:na]
>> at
>> org.eclipse.jetty.servlet.ServletContextHandler.<init>(ServletContextHandler.java:150)
>> ~[na:na]
>> at
>> org.eclipse.jetty.servlet.ServletContextHandler.<init>(ServletContextHandler.java:116)
>> ~[na:na]
>> at
>> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.<init>(HttpServiceContext.java:110)
>> ~[na:na]
>> at
>> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:237)
>> ~[na:na]
>> at
>> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:171)
>> ~[na:na]
>> at
>> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:152)
>> ~[na:na]
>> at
>> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:203)
>> ~[na:na]
>>
>> *ContextHandler configuration*
>> <Set name="handler">
>> <New id="Handlers"
>> class="org.eclipse.jetty.server.handler.HandlerCollection">
>>
>> <Set name="handlers">
>> <Array type="org.eclipse.jetty.server.Handler">
>> <Item>
>> <New id="Contexts"
>> class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
>> <Set name="handlers">
>>
>> <Array type="org.eclipse.jetty.server.handler.ContextHandler">
>>
>> <Item>
>>
>> <New id="ContextHandler"
>> class="org.eclipse.jetty.server.handler.ContextHandler">
>>
>> <Set name="contextPath">/docs</Set>
>>
>> <Set name="handler">
>>
>> <New
>> class="org.eclipse.jetty.server.handler.ResourceHandler">
>>
>> <Set
>> name="directoriesListed">true</Set>
>>
>> <Set
>> name="resourceBase">E:/opt/css/</Set>
>>
>> <Set
>> name="welcomeFiles">
>>
>> <Array
>> type="String">
>>
>>
>> <Item>index.html</Item>
>>
>> </Array>
>>
>> </Set>
>>
>> <Set
>> name="cacheControl">max-age=3600,public</Set>
>>
>> </New>
>>
>> </Set>
>>
>> </New>
>>
>> </Item>
>>
>> </Array>
>> </Set>
>>
>>
>> </New>
>> </Item>
>> <Item>
>> <New id="DefaultHandler"
>> class="org.eclipse.jetty.server.handler.DefaultHandler"/>
>> </Item>
>> </Array>
>> </Set>
>> </New>
>> </Set>
>> --
>> Srikanth
>> www. <http://www.srikanthugar.in>gharki.com
>>
>>
>>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
>
> Software Architect / Project Manager / Scrum Master
>
>
--
Srikanth
www.srikanthugar.in
Re: ContextHandler in jetty.xml with karaf 3.0.0
Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,
please take a look at my blog post [1] about this :)
regards, Achim
[1] -
http://notizblog.nierbeck.de/2011/05/adding-additional-servletcontext-in-pax-web/
2014-09-22 10:11 GMT+02:00 Srikanth Hugar <sr...@gmail.com>:
> Hello,
>
> I get below exception when i try to use ContextHandler in jetty.xml in
> karaf 3.0.0. What could be the problem?
> Same configuration works if i run jetty independently outside karaf.
>
> *Exception*
> 12:40:32.641 [FelixStartLevel] ERROR
> o.o.p.w.e.w.internal.WebApplication - Registration skipped for
> [ServletWebElement{mapping=DefaultServletMapping{httpContextId=null,urlPatterns=null,initParams={},servlet=org.apache.cxf.transport.servlet.CXFNonSpringServlet@31640c79,
> alias=/css, servletNameSharingServer}}] due to error during registration
> java.lang.IllegalStateException: STARTED
> at
> org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:80)
> ~[na:na]
> at
> org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:282)
> ~[na:na]
> at
> org.eclipse.jetty.servlet.ServletContextHandler.<init>(ServletContextHandler.java:150)
> ~[na:na]
> at
> org.eclipse.jetty.servlet.ServletContextHandler.<init>(ServletContextHandler.java:116)
> ~[na:na]
> at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.<init>(HttpServiceContext.java:110)
> ~[na:na]
> at
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:237)
> ~[na:na]
> at
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:171)
> ~[na:na]
> at
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:152)
> ~[na:na]
> at
> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:203)
> ~[na:na]
>
> *ContextHandler configuration*
> <Set name="handler">
> <New id="Handlers"
> class="org.eclipse.jetty.server.handler.HandlerCollection">
>
> <Set name="handlers">
> <Array type="org.eclipse.jetty.server.Handler">
> <Item>
> <New id="Contexts"
> class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
> <Set name="handlers">
>
> <Array type="org.eclipse.jetty.server.handler.ContextHandler">
>
> <Item>
>
> <New id="ContextHandler"
> class="org.eclipse.jetty.server.handler.ContextHandler">
>
> <Set name="contextPath">/docs</Set>
>
> <Set name="handler">
>
> <New
> class="org.eclipse.jetty.server.handler.ResourceHandler">
>
> <Set
> name="directoriesListed">true</Set>
>
> <Set
> name="resourceBase">E:/opt/css/</Set>
>
> <Set
> name="welcomeFiles">
>
> <Array
> type="String">
>
>
> <Item>index.html</Item>
>
> </Array>
>
> </Set>
>
> <Set
> name="cacheControl">max-age=3600,public</Set>
>
> </New>
>
> </Set>
>
> </New>
>
> </Item>
>
> </Array>
> </Set>
>
>
> </New>
> </Item>
> <Item>
> <New id="DefaultHandler"
> class="org.eclipse.jetty.server.handler.DefaultHandler"/>
> </Item>
> </Array>
> </Set>
> </New>
> </Set>
> --
> Srikanth
> www. <http://www.srikanthugar.in>gharki.com
>
>
>
--
Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Software Architect / Project Manager / Scrum Master