Tomcat手動啟動/部署[非安裝版]
Tomcat手動啟動/部署[非安裝版]
寫在前面的話:
以前做JavaWeb開發時習慣了,用Eclipse或者Idea等開發工具開發,除錯程式碼. 基本上以來工具的Tomcat外掛就很方便的實現了專案的釋出/啟動.
後來, 想自己寫一些靜態頁面時,不知道如何手動去部署/啟動Tomcat,網上找了下,似乎不是那麼容易找到.這裡自己備註一下, 以便下次查閱.
*確保自己JDK已經安裝好, 即已經配置好Java環境, 驗證是否已安裝:命令視窗執行:java -version 可成功執行,顯示自己安裝JDK的版本即表示已配置java環境.
- 將自己要部署的專案打成war包/靜態頁面,將war包/靜態頁面放置在tomcat的webapps包下面
…\Apache\Tomcat\apache-tomcat-7.0.64\webapps
類似這樣的目錄下
然後找到bin目錄下startup.bat,並編輯,加入:set JAVA_HOME=H:\Program Files\java\jdk1.8
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License. You may obtain a copy of the License at
rem
rem http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.
rem ---------------------------------------------------------------------------
rem Start script for the CATALINA Server
rem ---------------------------------------------------------------------------
setlocal
rem Guess CATALINA_HOME if not defined
set JAVA=H:\Program Files\java\jdk1.8
set "CURRENT_DIR=%cd%"
如上所示,然後儲存關閉,右鍵以管理員身份啟動該bat檔案即可
然後在瀏覽中輸入 localhost:8080/hello.html
寫在後面的話,第一次寫部落格,有不好的地方請指出.thx
相關文章
- SpringBoot手動部署到Tomcat和自動化熱部署Spring BootTomcat熱部署
- Tomcat 8安裝部署Tomcat
- Linux之換源、Tomcat及jdk的安裝配置和設定Tomcat自動啟動LinuxTomcatJDK
- Linux Tomcat安裝篇(daemon執行,開機自啟動)LinuxTomcat
- Linux配置JavaEE環境 Linux中安裝JDK、Tomcat、mysql 設定Tomcat自啟動、設定mysql自啟動LinuxJavaJDKTomcatMySql
- 輕鬆部署 Laravel 應用 | 《05. 手動部署 - 安裝 Nginx》LaravelNginx
- Spring Boot移除內嵌Tomcat,使用非web方式啟動Spring BootTomcatWeb
- 輕鬆部署 Laravel 應用 | 《06. 手動部署 - 安裝 PHP-FPM》LaravelPHP
- 輕鬆部署 Laravel 應用 | 《07. 手動部署 - 安裝 Git 和 Composer》LaravelGit
- SpringBootApplication是如何啟動Tomcat的? | 破解SpringBoot Tomcat啟動之謎 !Spring BootAPPTomcat
- Mindoc安裝與啟動
- 快速手動安裝 msyql
- tomcat 啟動失敗Tomcat
- Supervisor安裝、配置、開啟啟動
- Eclipse/tomcat 如何實現應用熱部署和熱啟動EclipseTomcat熱部署
- Windows 安裝包啟動PostgresqlWindowsSQL
- Kafka 的安裝及啟動Kafka
- 手動安裝ROS2ROS
- Tigase手動安裝過程
- Tomcat啟動流程簡析Tomcat
- Linux下Tomcat重新啟動LinuxTomcat
- atom-package 安裝緩慢,手動安裝Package
- K8S搭建自動化部署環境 Jenkins下載、安裝和啟動K8SJenkins
- Linux系統安裝tomcat並部署專案。LinuxTomcat
- Centos7安裝jenkins+docker部署tomcatCentOSJenkinsDockerTomcat
- OpenStack Q版雙機部署-啟動例項
- 深入淺出Tomcat/2 - Tomcat啟動和停止Tomcat
- jenkins安裝提示無法啟動Jenkins
- laradock安裝rabbitmq無法啟動MQ
- 如何安裝MongoDB併成功啟動MongoDB
- postgresql的安裝和啟動方法SQL
- mongodb的安裝和啟動方法MongoDB
- Linux環境下Minio的安裝部署與啟動教程(完整版)Linux
- 【Hyperledger Fabric】Fabric 2.2 手動安裝
- 在idea中手動安裝lombokIdeaLombok
- 靜默安裝and手動建庫
- Tomcat原始碼分析--啟動流程Tomcat原始碼
- 9. 啟動、關閉tomcatTomcat
- 在linux下啟動tomcat命令LinuxTomcat