Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Setting initParameters without web.xml

Hey guys.
I am working with Jetty 7.1.6 for several days now.  I am a pro Java developer with more than 7 years of experience behind my back and I must say this: “It is very difficult to configure this server. Because it has extremely poor documentation” If I was not very stubborn java developer with very much time to lose I would have given up long time ago. It seems a very nice software, but if you want it to gain wide spread popularity, you really should concentrate heavy on this documentation and most importantly – MORE EXAMPLES with USE CASES.
Now to the point. I want to use Jetty as a static content server mostly with some very simple servlets. I don’t want web app context, I don’t need sessions or security. I only want as much speed as possible. I want to use Gzip compression, file cashing and some of the other filters maybe like QoS.  I use Xml to configure it. My problem is, I am unable to set init parameters to DefaultServlet and to the other filters. I turned the internet upside down to search for this, but it looks a very well kept secret. Is that at all possible?
This is my context config so far:
<Configure class="org.eclipse.jetty.servlet.ServletContextHandler">
  <Set name="contextPath">/</Set>
  <Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/webroot/</Set>
  <Call name="addServlet">
Kind Regards,

Back to the top