Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidmoten/jetty-demo
A demonstration webapp that can be started using mvn jetty:run
https://github.com/davidmoten/jetty-demo
Last synced: about 1 month ago
JSON representation
A demonstration webapp that can be started using mvn jetty:run
- Host: GitHub
- URL: https://github.com/davidmoten/jetty-demo
- Owner: davidmoten
- Created: 2013-02-28T08:34:53.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-08-28T09:54:08.000Z (3 months ago)
- Last Synced: 2024-08-28T11:15:31.583Z (3 months ago)
- Language: JavaScript
- Size: 240 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
jetty-demo
==========A demonstration webapp *simple* that can be started using mvn jetty:run. Complete instructions are given for setting up java, maven and git on ubuntu 12.04 or later.
In addition to the *simple* demo the following projects are placed under the *jetty-demo* project for the more advanced/curious audience:
* *jsf* (Java Server Faces on jetty)
* *jersey* (Jersey REST services on jetty)
* *wicket* (Wicket framework on jetty)
* *click* (Apache Click framework on jetty)
* *spring* (Spring MVC on jetty)## Audience
This project was setup to demonstrate to someone unfamiliar with java that wants to write a web application how it can be done (pretty minimally).## Prerequisites
Instructions are here for setting up java, maven and git on ubuntu 12.04 or later.### Install java jdk
jdk 1.6 or later is preferred. This installs jdk 1.7:```
sudo apt-get install python-software-properties
sudo apt-add-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
```### Install maven
maven 3 is required:```
sudo add-apt-repository -y ppa:natecarlson/maven3
sudo apt-get update
sudo apt-get install maven3
sudo ln -s /usr/share/maven3/bin/mvn /usr/bin/mvn
```
### Install git
required to get the source from github:```
sudo apt-get install git
```Run it
-------------------------
Get the demo project```
cd
git clone https://github.com/davidmoten/jetty-demo.git
```and start it up
```
cd jetty-demo/simple
mvn jetty:run
```Go to [http://localhost:8080](http://localhost:8080) in a browser.
Two things are demonstrated by this webapp:
* a java servlet (3.0)
* a jsp pageModify it
-------------------------To play with the webapp in Eclipse IDE download the latest *Eclipse IDE for Java Developers* from [http://www.eclipse.org/downloads/](here).
Start eclipse and import your project:
*File - Import - Maven - Existing Maven Projects - Next - browse into the jetty-demo/simple directory and hit OK*
There it is, with luck, ready to muck around with as you please.
If *maven jetty:run* is running you will notice that changes saved to the code are autodeployed every 3 seconds (configured in pom.xml).
The other examples
-------------------
To try for example the *jersey* example do the same as above except in the *jetty-demo/jersey* directory.Note that SSL is supported by the *wicket* and *spring* examples at
* [http://localhost:8443](http://localhost:8443)