Windows uses batching to publish Web to Tomcat and start Tomcat script sharing _dos/bat

Source: Internet
Author: User

Copy Code code as follows:

@ECHO off
@REM deploy the Web system to Tomcat
Set date=%date:~0,10%
Set time=%time:~0,8%
Set Currdate=%date%%time%
Echo starts to copy the compiled code from the workspace into Tomcat ...%currdate%

Echo Set parameters
Set work_space=j:\ fluttering \it\workspace
Set PRJ_NAME=MYSTRUTS1PRJ
Set Prj_web_root=mystruts1prj\webcontent
Set Bin=build
Set catalina_home=j:\ fluttering \it\tools\tomcat6_0_3_5
Set Web_name=webapp

@REM before deleting the
Echo deleted before the
CD%catalina_home%\webapps
If exist%web_name% rd/s/q%web_name%

@REM New
MD%web_name%

@REM Copy project compiled files to Tomcat
echo copy works with compiled files to Tomcat\webapps
xcopy%work_space%\%prj_web_root%%catalina_home%\webapps\%web_name%/s/e/f/a
xcopy%work_space%\%prj_name%\%bin%%catalina_home%\webapps\%web_name%\web-inf/s/e/f/A

@REM Start Tomcat
Echo starts Tomcat
CD%catalina_home%\bin
Call Startup.bat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.