Schlagwort-Archive: pax

Adding additional ServletContext in Pax Web

If you want to add certain special handlers for Jetty you just go ahead and
alter the jetty.xml file. Usually you just add the following peace of code

<Set name="handler">
 <New class="org.eclipse.jetty.server.handler.HandlerList">
  <Set name="handlers">
   <Array type="org.eclipse.jetty.server.Handler">
    <Item>
     <New class="org.eclipse.jetty.servlet.ServletContextHandler">
      <Set name="contextPath">/app</Set>
      <Set name="resourceBase">/path/to/your/share</Set>
      <Call name="addServlet">
       <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
       <Arg>/</Arg>
      </Call>
     </New>
    </Item>
   </Array>
  </Set>
 </New>
</Set>

This won’t work together with Pax Web since Pax Web does have a specialized ServletContext Handler.

So Instead of defining a new one you just need to use the one that is already there. Please keep in mind
the master configuration of the Jetty Server is contained within the configuration of Pax Web.

PAXWEB-210

Just the other day I was able to finaly finish my work on PAXWEB-210.
This took me a while, after the upgrade to Jetty7 the configuration of the SecurityRealm through the web.xml descritptor didn’t work anymore. 🙁
The issue on this has been, that the context of the application was already started. I was able to work around this, and finally the realm can be configured before the context is started again.

PAX-Web

Just did finish most parts of the issue PAXWEB-210 I was working on now for about two weeks. While I was working on this issue I have seen a lot of code. That is one of the reasons why I was able to fix quite some bugs. I also added on requested improvement PAXWEB-193. I needed this to easely add „UserRealm“ objects to the server configuration, another way of configuring the pax-web jetty server is to add a fragment containing the configuration which I personaly dislike. All of the changes can be found on github here. Go ahead and review 🙂