GithubHelp home page GithubHelp logo

education-web / java-ee-quickstart Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 1.0 870 KB

Java EE quickstart samples

License: GNU General Public License v3.0

Java 90.78% HTML 9.22%
java java-ee java-ee-7 javaee javaee7 jdbc jsp jpa jsf jsf2

java-ee-quickstart's Introduction

Java EE Quickstart Samples

Project goal is to observe core Java EE technologies in the sample CRUD application.

How to set up the environment?

Set up Wildfly

  1. Download Wildfly at http://wildfly.org/downloads/Sample. This samples use version 10.1.0.Final.
  2. Unpack the Wildfly archive.
  3. Set the WILDFLY_HOME environment variable to point to the Wildfly installation directory.

Set up PostgreSQL (only for production mode)

  1. Download PostgreSQL at https://www.postgresql.org/download/
  2. Connect to PostgreSQL, i.e. using psql or pgAdmin.
  3. Execute the following SQL commands:
DROP DATABASE IF EXISTS jee;
CREATE DATABASE jee;
DROP USER IF EXISTS jee;
CREATE USER jee WITH PASSWORD 'jee';
GRANT ALL PRIVILEGES ON DATABASE jee to jee;

Register PostgreSQL as datasource in Wildfly (only for production mode)

For Windows

Using command shell navigate to current folder.

Execute following commands:

start %WILDFLY_HOME%\bin\standalone.bat
%WILDFLY_HOME%\bin\jboss-cli.bat --connect

These commands should be executed in jboss-cli

module add --name=org.postgres --resources=.\lib\postgresql-9.4.1211.jar --dependencies=javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgres",driver-class-name=org.postgresql.Driver)
data-source add --name=JavaEEDS --jndi-name=java:jboss/datasources/JavaEEDS --driver-name=postgres --connection-url=jdbc:postgresql://localhost:5432/jee --user-name=jee --password=jee

Run application

Development mode

  1. Launch Wildfly

For Windows execute following command:

start %WILDFLY_HOME%\bin\standalone.bat

For Unix-based execute following command:

%WILDFLY_HOME%/bin/standalone.sh &
  1. From the command shell navigate to the latest sample, fro example: jee-4-jsf and execute command:
mvn wildfly:deploy

Production mode

  1. Launch Postgres

For Windows start the Service with name PostgreSQL 9.6 Server or similar for other PostgreSQL versions.

  1. Launch Wildfly

For Windows execute following command:

start %WILDFLY_HOME%\bin\standalone.bat

For Unix-based execute following command:

%WILDFLY_HOME%/bin/standalone.sh &
  1. From the command shell navigate to the latest sample, fro example: jee-4-jsf and execute command:
mvn wildfly:deploy

java-ee-quickstart's People

Contributors

exarus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

hrodi

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.