Giter Site home page Giter Site logo

ci-servlet-demo's Introduction

Sample Java Web Application with Servlet API 3.x

lokeshsingana

This demo is based on servlet demo from oracle sample available here.

I have made few fixes to original demo to make it compatible with current scenario.

I have modified my Dockerfile to support Multi Stage Build.

You just need docker installed to build entire webapp and also create an executable container image for it.

Steps

  1. Use either cmd or powershell or bash terminal and use following commands:

    NOTE: the $ symbol represent a prompt it's not part of command.

    ## clone this repository in current directory
    ## Don't worry, You DON'T NEED GitHub account!
    $ git clone https://github.com/mahendra-shinde/ci-servlet-demo
    $ cd ci-servlet-demo
    ## Build a new container image `temp` (can be replaced with whatever name you want!)
    $ docker build -t temp .
    
  2. Once you build an image, run the application using following command:

    ## replace `temp` with image name you have used in last command
    $ docker run --name myapp -d -p 8080:8080 temp
  3. Now, Open web browser to visit url http://localhost:8080/

  4. Now, to clean-up, stop the above container and delete it.

    ## stop and delete the container
    $ docker stop myapp
    $ docker rm myapp
    ## Optionally, delete the image as well
    ## WARN: image cannot be deleted if any stopped / running container
    ## is based on this image.
    $ docker rmi temp

ci-servlet-demo's People

Contributors

mahendra-shinde avatar lokeshsingana 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.