Tomcat 상용 조작
1. tomcat
1.1 32-bit Windows zip [apache-tomcat-7.0.4-windows-x86.zip]
http://tomcat.apache.org/download-70.cgi
1.2 apache-tomcat-7.0.4-windows-x86.zip
d:/apache/apache-tomcat-7.0.4
|-bin
|-conf
|-lib
|-logs
|-temp
|-webapps
|-work [web ]
|-...
# %TOMCAT_HOME% = d:/apache/apache-tomcat-7.0.4
1.3 tomcat
%TOMCAT_HOME%/bin/startup.bat
1.4 tomcat
http://localhost:8080/
1.5 tomcat
%TOMCAT_HOME%/bin/shutdown.bat
2. web
2.1 : context.xml
# %TOMCAT_HOME%/conf/Catalina/localhost/my.xml
# "my" web contextPath
# my.xml
<?xml version="1.0" encoding="utf-8"?>
<Context docBase="D:\workspace\eclipse_wksp\MyWebApp\WebContent"
reloadable="true">
</Context>
# docBase
.../WebContent
|-META-INF
|-WEB-INF
|-classes
|-lib
|-web.xml
|-index.jsp
|-...
# tomcat
# web
http://localhost:8080/my
2.2 : web %TOMCAT_HOME%/webapps
#
%TOMCAT_HOME%/webapps/myweb
|-META-INF
|-WEB-INF
|-classes
|-lib
|-web.xml
|-index.jsp
|-...
# "myweb" web contextPath
# tomcat
# web
http://localhost:8080/myweb
2.3 : .war
# MyWebApp.war %TOMCAT_HOME%/webapps
# .war
%TOMCAT_HOME%/webapps/MyWebApp.war
|-META-INF
|-WEB-INF
|-classes
|-lib
|-web.xml
|-index.jsp
|-...
# tomcat, tomcat .war
# MyWebApp.war "MyWebApp" web contextPath
# web
http://localhost:8080/MyWebApp
3.
# %TOMCAT_HOME%/conf/server.xml
# Engine Host , Host
# Host name "localhost2", appBase "webapps2"
# %TOMCAT_HOME%/conf/Catalina/localhost2
# %TOMCAT_HOME%/webapps2
# web myapp %TOMCAT_HOME%/webapps2
# myapp
%TOMCAT_HOME%/webapps2/myapp
|-META-INF
|-WEB-INF
|-classes
|-lib
|-web.xml
|_index.jsp
|-...
# C:\Windows\System32\drivers\etc\hosts
# ubuntu /etc/hosts
#
127.0.0.1 localhost2
# tomcat
# web
http://localhost2:8080/myapp
4. Service
# %TOMCAT_HOME%/conf/server.xml
# Service , Service
# Service :
# Service name Catalina2
# Connector port 8080 8081
# Connector port 8009 8010
# Engine name Catalina Catalina2, Service name
# Host appBase webapps webapps2
#
%TOMCAT_HOME%/conf/Catalina2/localhost
%TOMCAT_HOME%/webapps2
# %TOMCAT_HOME%/webapps/ROOT %TOMCAT_HOME%/webapps2
> xcopy webapps\ROOT webapps2\ROOT /E [windows]
$ cp webapps\ROOT webapps2\ROOT [linux]
# tomcat
# tomcat
http://localhost:8080/
http://localhost:8081/
5. tomcat
# %TOMCAT_HOME%/bin/catalina.bat
# -Xms
# -Xmx
# -XX:PermSize
# -XX:MaxPermSize
set JAVA_OPTS=-server -Xincgc -Xms1024m -Xmx1024m -XX:MaxPermSize=256m
# [java -X]
# http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
# http://download.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#resources
#
# http://hi.baidu.com/wuyuwenct/blog/item/c3c9321de48e508787d6b6df.html
# http://www.duduwolf.com/wiki/2009/922.html
6. JRebel hot update .class
# %TOMCAT_HOME%/bin/catalina.bat
set JAVA_OPTS=%JAVA_OPTS% -noverify -javaagent:D:/library/lib_share/jrebel.jar
# WEB-INF/classes .class,
# WEB-INF/lib .jar , .jar,
# WEB-INF/classes/rebel.xml,
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.zeroturnaround.com"
xsi:schemaLocation="http://www.zeroturnaround.com
http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd">
<classpath>
<dir name="D:\workspace\eclipse_my\Test\WebContent\WEB-INF\classes"/>
</classpath>
</application>
# :http://www.zeroturnaround.com/jrebel/
첨부:
1. tomcat for eclipse plugin
http://www.eclipsetotale.com/tomcatPlugin.html
2. jndi
http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html#JDBC_Data_Sources
3. tomcat
http://www.ibm.com/developerworks/cn/education/java/j-tomcat/index.html https://www.ibm.com/developerworks/cn/java/j-lo-tomcat1/ http://www.ibm.com/developerworks/cn/java/j-lo-tomcat2/
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
자바 파일 압축 및 압축 풀기파일 의 간단 한 압축 과 압축 해 제 를 실현 하 였 다.주요 테스트 용 에는 급 하 게 쓸 수 있 는 부분 이 있 으 니 불편 한 점 이 있 으 면 아낌없이 가르쳐 주 십시오. 1. 중국어 문 제 를 해 결 했 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.