Bat script to run Tomcat

 1. Directory structure

Put jre in the java directory; I use jre1.7 here; I put tomcat7 in the apache-tomcat directory


 

@echo off
title Tomcat-Web App server Ctrl+C key to end the service
@echo is starting...
cd /d %~dp0
set startDir=%cd%
echo %startDir%|findstr /ibe "[0-9a-z:\\\~\!\@\#\$\(\)\_\+\`\-\=\;\'\.\,]*">nul&&goto run||goto error

:error
echo error: do not unzip the version in a directory containing Chinese, spaces and special characters!
pause
goto end

:run
@echo .
@echo ... small tip ................................................ ................................
@echo .                                                                         .
@echo . How to connect.
@echo . Browser address: http://127.0.0.1:8080/                                        . .
@echo .                                                                         .
@echo ...........................................................................
cd "%startDir%\apache-tomcat\bin"
call startup.bat

:end

 
Just put the war package you want, rename it ROOT.war, put it in the apche-tomcat/webapp directory, and start the bat script to access it.

The address is http://127.0.0.1:8080

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326358441&siteId=291194637