Skip to content

Instantly share code, notes, and snippets.

@lyhcode
Created February 15, 2012 02:25
Show Gist options
  • Save lyhcode/1832631 to your computer and use it in GitHub Desktop.
Save lyhcode/1832631 to your computer and use it in GitHub Desktop.
Gradle + Jetty + AJP (Ajp13SocketConnector)
apply plugin: 'jetty'
apply plugin: 'java'
apply plugin: 'groovy'
repositories {
mavenCentral()
}
dependencies {
providedRuntime 'org.mortbay.jetty:jetty-ajp:6.1.26'
// Servlet & JSP
compile 'javax.servlet:servlet-api:2.5'
compile 'javax.servlet:jsp-api:2.0'
}
[jettyRun, jettyRunWar]*.with {
jettyConfig = new File('src/main/resources/jetty.xml')
additionalRuntimeJars = sourceSets.main.runtimeClasspath
}
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure id="Server" class="org.mortbay.jetty.Server">
<Call name="addConnector">
<Arg>
<New class="org.mortbay.jetty.ajp.Ajp13SocketConnector">
<Set name="port">8009</Set>
</New>
</Arg>
</Call>
</Configure>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment