Reputation: 4874
Is it possible to change init-param of Jetty's default servlet from within pom.xml?
--
I'm dealing with the Windows-specific issue when you can't save files once Jetty is running within Eclipse. I went the usual way of copying webdefault.xml but
1) I find this solution kinda over-complicated and, more importantly, when the Jetty developer team decides to change stuff in their default configuration it won't get reflected in my project,
2) right away I'm getting "java.lang.ClassNotFoundException: org.mortbay.jetty.servlet.DefaultServlet" when running my app in Eclipse
That makes me think this is just too much hassle to deal with a bug.
Upvotes: 0
Views: 1160
Reputation: 49515
The class org.mortbay.jetty.servlet.DefaultServlet
is only for Jetty 6 and older. The class for Jetty 7+ is org.eclipse.jetty.servlet.DefaultServlet
.
Important Note: Jetty 6 was EOL'd in early 2010. Jetty 7 and Jetty 8 are going to be EOL at the end of 2014. Jetty 9 is the current stable/secure/mature Jetty for todays public web.
You make no statement on what version of Jetty you are running, hard to answer without it?
You also have provided no details on how you are running Jetty? (some common examples: command line, cargo maven plugin, org.mortbay.jetty maven plugin, org.eclipse.jetty maven plugin, old eclipse plugin, new eclipse plugin, standalone distribution, embedded launcher, arquillian testing profile, junit runner, testng runner, etc..).
Point is, there's hundreds of common ways to start / run jetty. Without these details, offering an answer on how to configure for your scenario is difficult. Please update your question with more details.
Upvotes: 1