Tomcat

Run

bin/startup.sh
bin\startup.bat

Folder

Tomcat Architecture

tomcat architecture

Eclipse(STS) Tomcat Tip

SSL

keytool -genkey -alias tomcat -keyalg RSA -keystore ~/.ssh/okdevtv.keystore
<Connector
           protocol="org.apache.coyote.http11.Http11NioProtocol"
           port="8443" maxThreads="200"
           scheme="https" secure="true" SSLEnabled="true"
           keystoreFile="${user.home}/.ssh/okdevtv.keystore" keystorePass="okpassokpass"
           clientAuth="false" sslProtocol="TLS"/>
curl https://localhost:8443 -k

Sharing Session

conf/context.xml

<Context sessionCookiePath="/">
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html lang="ko">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Checker</title>
</head>
<body>
  <b>context path</b> : <%= application.getContextPath() %><hr />
  <b>sesseion id</b> : <%= session.getId() %><hr />
  <b>cookie string</b> : <%= request.getHeader("cookie") %>
</body>
</html>

ref

What Else?
inflearn react api server -50% 할인쿠폰: 15108-f2af1e086101 buy me a coffee