Git Product home page Git Product logo

tomcat-jsp-template's Introduction

Tomcat JSP Server Template

This repository is for migrating old jsp-based sites on cafe24.

Tomcat 9 is used for javax compatibility (from 10, jakarta is used by default)

For SPARCS Academic Relations Team (by UrWrstNightmare/[email protected]/night)

How to setup

1. Preparation

1.1 GET the corresponding webapp directory of the server

1.2 GET the corresponding dump of the database

2. Setup

2.1 Clone this repository

2.2 Copy the webapp directory into the www directory

2.3 Copy the database dump into the .initdb directory (The file extension should be .sql)

2.4.1 Edit docker-compose.yml

  • 2.4.1.1 Rename the db and tomcat services' names (Remember these values!)
  • 2.4.1.2 In services/db/environment configure the database credentials. (Remember these values!)
  • 2.4.1.3 Change the exposed ports of db and tomcat (Remember these values!)
  • 2.4.1.4 Change the named volume's name

2.4.2 Go to www/WEB-INF/classes/config (JSP's compiled classes)

  • 2.4.2.1 Change the database connector properties to the values configured above
    • The URL should be mapped to the db's NAME property
    • The username & password of the database should be the same as the environment variables

2.4.3 Edit server.xml

  • 2.4.3.1 In the <Service name="kepsi"> directive, change the secret value & name
  • 2.4.3.2 Change the defaultHost, host and alias values
  • 2.4.3.3 Change the Logger Valve's access log names

2.4.4 Run sudo docker compose up -d

2.4.5 (If you run nginx as your reverse proxy) Go to /etc/nginx/sites-available

  • 2.4.5.1 Create the configuration file
  • 2.4.5.2 Edit the server name and port number of the reverse proxy
  • 2.4.5.3 Enable the service by running sudo ln -s <origin absolute path> <destination>
  • 2.4.5.4. RUN sudo systemctl restart nginx

2.4.6 Configure DNS to point to your server's ip

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.