/opt/apache-inComBOMP/conf
Server.xml 相关配置信息
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
<Resource
name="jdbc/inComBOMP"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://192.168.1.30:3306/incomtemp"
maxActive="50"
maxldle="10"
maxWait="5000"
username="incomBomp"
password="comeup2012" />
</GlobalNamingResources>
XXXXXXXXX其他内容省略XXXXXXXXXX
<Context docBase="/opt/apache-inComBOMP/webapps/inComBOMP" path="">
<ResourceLink global="jdbc/inComBOMP" name="jdbc/inComBOMP" type="javax.sql.DataSource"/>
</Context>
{WEB APP NAME}/WEB-INF/web.xml
<web-app>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/inComBOMP</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
{WEB APP NAME}/WEB-INF/classes
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd"
>
<jee:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/DATA_SOURCE_NAME" />
</beans>
{TOMCATHOME}\conf\ tomcat-users.xml
<role rolename="admin"/>
<role rolename="manager"/>
<user username="admin" password="admin" roles="manager"/>
<user username="tomcat" password="tomcat" roles="admin"/>
<user username="role1" password="tomcat" roles="admin"/>
Administration |
查看到所有项目的运行情况
Applications
Path Display Name Running Sessions Commands
/inComBOMP baseplatform-func true 2 Start Stop Reload Undeploy
=========================References ==================
http://192.168.1.110:8080/docs/html-manager-howto.html
如下:
<Context docBase="inComTest" path="/inComTest" reloadable="true" source="org.eclipse.jst.jee.server:inComTest"/>
而用页面上传war包部署方式则会出现错误
修正:
<!-- Context docBase="inComTest" path="/inComTest" reloadable="true" source="org.eclipse.jst.jee.server:inComTest"/-->
部署成功则显示如下内容
项目部署在如下位置
F:\work_space_AITSoft\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
以下文件为 tomcat 配置以及说明的文件
F:\work_space_AITSoft\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps
/Servers/AIT-config/server.xml 配置文件如下
注意:path如果设置为/ 则浏览器访问localhost:8070/index.html 会显示404错误
<?xml version="1.0" encoding="UTF-8"?> <Server port="8011" shutdown="SHUTDOWN"> <Service name="LOTTESS"> <Connector URIEncoding="UTF-8" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8070" redirectPort="8443"/> <Engine defaultHost="LOTTESS" name="LOTTESS"> <Host appBase="webapps" autoDeploy="true" name="LOTTESS" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false"> <Context docBase="lotte_ss_s" path="/lotte_ss_s" reloadable="true" source="org.eclipse.jst.jee.server:lotte_ss_s"/></Host> </Engine> </Service> </Server>
{TOMCATHOME}/webapps
其中lottes_ss_s.war为 独立的web项目
其他为tomcat内置的文件系统
以上两者均可以访问tomcat管理员界面
浏览器输入如下地址
localhost:8070/index.html