Giter Club home page Giter Club logo

liquorstoreservlet's Introduction

LiquorStoreServlet

The code consists of several Java classes and a pom.xml file for a liquor store application. The main classes are:

LiquorType.java - An enum class that defines the different types of liquor (WINE, BEER, WHISKY).

LiquorService.java - A class that provides the available brands of liquor based on the type. It contains a method getAvailableBrands that takes the type of liquor as an input and returns a list of available brands.

SelectLiquorServlet.java - A servlet class that is called when a user submits the form on the index.html page. This class retrieves the selected liquor type from the form and calls the getAvailableBrands method of the LiquorService class. It then sets the returned list of brands as an attribute of the request and forwards the request to the result.jsp page.

web.xml - The web deployment descriptor for the application. It defines the tracking mode for the application's sessions.

index.html - A HTML page that allows the user to select the type of liquor from a dropdown list.

result.jsp - A JSP page that displays the available brands of liquor based on the user's selection.

pom.xml - The Maven Project Object Model (POM) file that contains information about the project and its dependencies.

This repository contains code for a Java Servlet application that runs in a Tomcat container and a Kubernetes deployment configuration.

Dockerfile

The Dockerfile builds two Docker images, one for building the Java Servlet application using Maven and another for running the application in a Tomcat container.

Kubernetes Manifest

The Kubernetes manifest LiquorServlet-Java-Web-App-Deployment.yaml defines a deployment and a service for the Java Servlet application. The deployment creates two replicas of the application and the service exposes the application on port 80.

Jenkinsfile

The Jenkinsfile describes a Jenkins pipeline for building, pushing and deploying the Java Servlet application. The pipeline consists of four stages:

  1. Git checkout: Check out the source code from the repository on GitHub.
  2. Docker build: Build a Docker image of the Java Servlet application.
  3. Docker push: Push the Docker image to Docker Hub.
  4. Kubernetes deployment: Apply the Kubernetes deployment configuration to create a deployment and a service for the application.

liquorstoreservlet's People

Contributors

gmk1995 avatar

Watchers

 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.