Giter VIP home page Giter VIP logo

runjettyrun's Introduction

RunJettyRun: Jetty Eclipse Run Configuration Plugin

This new version of RunJettyRun is forked from the orginal work done at http://code.google.com/p/run-jetty-run/. Unfortunately the old version has the limitation of only allowing configuration from the plugin dialog and only supporting Jetty6. This new version now supports the ability to supply a jetty.xml configuration file in addition to supporting both Jetty6, Jetty7 and Jetty8.

The one caveat is that support for JSP 2.2 in Jetty8 has not yet been included, it only supports 2.1. Once the various Maven dependencies are finalized for Jetty8 and JSP then version 2.2 will be included.

This version has been tested on Eclipse 3.5 - 3.6. Feedback on whether this works on older versions of Eclipse is encouraged.

Features

  • Rebuilt to use Maven2 and eliminated external dependencies
  • Easily select between embedded versions of Jetty6, Jetty7 and Jetty8
  • Supply jetty.xml file via configuration dialog
  • New update site hosted on GitHub

Update Site

Quick Start

Simply use Eclipse's update manager (Help -> Install New Software... -> Add... to add a remote site and point it to http://alexwinston.github.com/RunJettyRun/site/update. Click finish, select the plugin (just one choice) and finish again.

Open "Run Configurations" and add a new "Jetty Webapp". Select between Jetty6 and Jetty7 and then click "Browse" to locate a jetty.xml file on the filesystem or simply type the name of the jetty.xml file for the current project. By default the plugin will look in the project root directory if a path is not specified.

Building

RunJettyRun uses Maven to build the plugin. Running "mvn package" from the root should build the bootstrap and feature projects and subsequently build the plugin and copy the jar to the site/update/plugin directory.

Example Jetty 6 jetty.xml File

<!-- =========================================================== -->
<!-- Server Thread Pool                                          -->
<!-- =========================================================== -->
<Set name="ThreadPool">
	<New class="org.mortbay.thread.BoundedThreadPool">
		<Set name="minThreads">10</Set>
		<Set name="maxThreads">100</Set>
	</New>
</Set>

<!-- =========================================================== -->
<!-- Set connectors                                              -->
<!-- =========================================================== -->
<Set name="connectors">
	<Array type="org.mortbay.jetty.Connector">
		<Item>
			<New class="org.mortbay.jetty.nio.SelectChannelConnector">
				<Set name="host">localhost</Set>
				<Set name="port">8080</Set>
				<Set name="maxIdleTime">30000</Set>
				<Set name="Acceptors">10</Set>
			</New>
		</Item>
	</Array>
</Set>

<!-- =========================================================== -->
<!-- Set handlers                                                -->
<!-- =========================================================== -->
<Set name="handlers">
	<Array type="org.mortbay.jetty.Handler">

		<!-- ======================================================= -->
		<!-- Configure a web application with web.xml           -->
		<!-- ======================================================= -->
		<Item>
			<New id="testWebAppContext" class="org.mortbay.jetty.webapp.WebAppContext">
				<Set name="contextPath">/</Set>
				<Set name="war">src/main/webapp</Set>
			</New>
		</Item>
	</Array>
</Set>

<!-- =========================================================== -->
<!-- extra options                                               -->
<!-- =========================================================== -->
<Set name="stopAtShutdown">true</Set>

Example Jetty 7 and 8 jetty.xml

<!-- =========================================================== -->
<!-- Server Thread Pool -->
<!-- =========================================================== -->
<Set name="ThreadPool">
	<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
		<Set name="minThreads">10</Set>
		<Set name="maxThreads">100</Set>
	</New>
</Set>

<!-- =========================================================== -->
<!-- Set connectors -->
<!-- =========================================================== -->
<Set name="connectors">
	<Array type="org.eclipse.jetty.server.Connector">
		<Item>
			<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
				<Set name="host">localhost</Set>
				<Set name="port">8080</Set>
				<Set name="maxIdleTime">30000</Set>
				<Set name="Acceptors">10</Set>
			</New>
		</Item>
	</Array>
</Set>

<!-- =========================================================== -->
<!-- Set handlers -->
<!-- =========================================================== -->
<Set name="handler">
	<New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
		<Set name="handlers">
			<Array type="org.eclipse.jetty.server.Handler">

				<!-- ======================================================= -->
				<!-- Configure a web application with web.xml -->
				<!-- ======================================================= -->
				<Item>
					<New class="org.eclipse.jetty.webapp.WebAppContext">
						<Set name="contextPath">/</Set>
						<Set name="war">src/main/webapp</Set>
					</New>
				</Item>
			</Array>
		</Set>
	</New>
</Set>

<!-- =========================================================== -->
<!-- extra options -->
<!-- =========================================================== -->
<Set name="stopAtShutdown">true</Set>

runjettyrun's People

Contributors

alexwinston avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.