Hi Thanks,
I did try this Configuration.ClassList approach earlier but I was getting an error "
Multiple markers at this line
- ClassList cannot be resolved or is not a field
- Configuration.ClassList cannot be resolved to a
type
I think was due to an incompatible server object.
I am working in another project now
this time I inserted the code , no eclipse IDE errors reported I guess the server object is compatible.
My code looks like this but still I am missing JSP feature. Not sure the syntax for that.
console error message" No JSP support. Check that JSP jars are in lib/jsp and that the JSP option has been specified to start."
I have these two dependencies in pom.xml
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>apache-jsp</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
This is what my code looks like but I don't think I have the jsp configuration in either variations
context.setBaseResource(Resource.newResource(webResourceBase));
context.setConfigurations(new Configuration[]
{
new AnnotationConfiguration(),
new WebInfConfiguration(),
new WebXmlConfiguration(),
new MetaInfConfiguration(),
new FragmentConfiguration(),
new EnvConfiguration(),
new PlusConfiguration(),
new JettyWebXmlConfiguration()
});
// === setup jetty plus ==
Configuration.ClassList classlist = Configuration.ClassList
.setServerDefault(server);
classlist.addAfter(
"org.eclipse.jetty.webapp.FragmentConfiguration",
"org.eclipse.jetty.plus.webapp.EnvConfiguration",
"org.eclipse.jetty.plus.webapp.PlusConfiguration");
classlist.addBefore("org.eclipse.jetty.webapp.JettyWebXmlConfiguration",
"org.eclipse.jetty.annotations.AnnotationConfiguration");
context.setContextPath("/");