did you read the FAQ?
http://wiki.eclipse.org/Jetty/FAQ#JSP_support_not_configured.3F
Am 11.08.2010 um 21:55 schrieb Juan Carlos Méndez:
I'm trying to run jetty using TestServer but the following error is thrown:
"JSP support not configured"
Any ideas?
This is my config:
JETTY = [
'org.mortbay.jetty:jetty:jar:6.1.25',
'org.mortbay.jetty:jetty-util:jar:6.1.25',
'org.mortbay.jetty:jsp-2.1-jetty:jar:6.1.25',
transitive('org.mortbay.jetty:maven-jetty-plugin:jar:6.1.25'),
'org.mortbay.jetty:maven-jetty-jspc-plugin:jar:6.1.25',
'sun-servlet:jsp-api:jar:2.4',
'javax.servlet:jsp-api:jar:2.0',
'org.apache.ant:ant:jar:1.8.1',
'xerces:xercesImpl:jar:2.9.1',
]
task :run => :compile do
Java::Commands.java('JettyTestServer',:classpath
=>compile.dependencies +
[compile.target.to_s]+package(:war).libs+artifacts(JETTY))
end
********
import org.mortbay.jetty.Server;
import org.mortbay.jetty.webapp.WebAppContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* @author
*
*/
class JettyTestServer {
private static final Logger log =
LoggerFactory.getLogger(JettyTestServer.class);
/**
*
* @param args
*/
public static void main(String[] args){
try {
Server server = new Server(9080);
WebAppContext webAppContext = new
WebAppContext("src/main/webapp", "/mywebapp");
String[] configClasses =
{"org.mortbay.jetty.webapp.WebInfConfiguration",
"org.mortbay.jetty.webapp.WebXmlConfiguration"};
webAppContext.setConfigurationClasses(configClasses);
server.addHandler(webAppContext);
server.start();
server.join();
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
}
*********
Juan Carlos