Giter Site home page Giter Site logo

kunchamrajkumar / tomcat-root-war Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andriykalashnykov/tomcat-root-war

0.0 0.0 0.0 2.54 MB

Java Web Application example to replace Tomcat's default ROOT application

License: MIT License

Java 96.10% HTML 3.90%

tomcat-root-war's Introduction

Build Maven Hits License: MIT

Java Web Application example

ROOT.war replaces Tomcat's default ROOT application - $TOMCAT_HOME/webapps/ROOT

Pre-requisites

  • sdkman

    Install and use JDK 18

    sdk install java 18.0.2-tem
    sdk use java 18.0.2-tem
  • Apache Maven

    Install Apache Maven 3.9.0

    sdk install maven 3.9.0
    sdk use maven 3.9.0
  • git

Test with Jetty web server

git clone [email protected]:AndriyKalashnykov/tomcat-root-war.git
cd tomcat-root-war
mvn clean package jetty:run

xdg-open http://localhost:8080/index.html

Access http://localhost:8080/index.html or see Tomcat ROOT WAR Web Application UI

Create WAR file

git clone [email protected]:AndriyKalashnykov/tomcat-root-war.git
cd tomcat-root-war
mvn clean install

List content of generated WAR file

jar tf ./target/ROOT.war

Replace TOMCAT ROOT application

Edit $TOMCAT_HOME/conf/server.xml: autoDeploy and deployOnStartUp needs to be set to false

<Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="false" deployOnStartUp="false">

Remove default ROOT folder and copy ROOT.war

rm -rf $TOMCAT_HOME/webapps/ROOT/
rm -f $TOMCAT_HOME/webapps/ROOT.war
cp ./target/ROOT.war $TOMCAT_HOME/webapps/ROOT.war

Tomcat ROOT WAR Web Application UI

Default welcome page - http://localhost:8080/ index.html

JSP - http://localhost:8080/index.jsp infoservlet

Servlet - http://localhost:8080/infoservlet infoservlet

HTML - http://localhost:8080/index.html infoservlet

This project used in

tomcat-root-war's People

Contributors

andriykalashnykov avatar dependabot[bot] avatar kunchamrajkumar 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.