English 中文(简体)
同一目录但不同港口的爆炸性网络服务
原标题:Deploy web service on same tomcat but on different port

I ve web Portal developed in struts which is used in tomcat on Port 8080 & now 我想在同一星座服务器上,但在不同的8090港部署网络服务。

C: omcat-6.0.32confserver.xml:

<?xml version= 1.0  encoding= utf-8 ?>
<Server port="8005" shutdown="SHUTDOWN">
   <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
   <Listener className="org.apache.catalina.core.JasperListener" />
   <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
   <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
   <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

  <GlobalNamingResources>
    <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" />
  </GlobalNamingResources>

  <Service name="Catalina">        
  <Connector port="8080" protocol="HTTP/1.1" 
           connectionTimeout="20000" 
           redirectPort="8443" />
  <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

  <Engine name="Catalina" defaultHost="localhost">
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
         resourceName="UserDatabase"/>
    <Host name="localhost"  appBase="webapps"
        unpackWARs="true" autoDeploy="true"
        xmlValidation="false" xmlNamespaceAware="false">
    </Host>
  </Engine>
  </Service>

  <Service name="testing">        
    <Connector port="8090" protocol="HTTP/1.1" 
           connectionTimeout="20000" 
           redirectPort="9443" />
    <Connector port="8092" protocol="AJP/1.3" redirectPort="9443" />
    <Engine name="testing" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
         resourceName="UserDatabase"/>
      <Host name="localhost"  appBase="webapps"
        unpackWARs="true" autoDeploy="true"
        xmlValidation="false" xmlNamespaceAware="false">
      </Host>
    </Engine>
  </Service>
</Server>

Here, I added new service entry with name testing for web service to deploy it on 8090. The portal s war file is exploded in C: omcat-6.0.32webappsROOT directory.

C: omcat-6.0.32confCatalina localhostROOT.xml 载有以下网站:

<?xml version="1.0" encoding="UTF-8"?>

<Context path="/" docBase="" debug="5" reloadable="false" useHttpOnly="true" crossContext="true">
</Context>

现在,为网络服务,我设立了C:omcat-6.0.32 电话会议,内容如下:

<?xml version="1.0" encoding="UTF-8"?>

<Context path="/" docBase="C:/testing" debug="5" reloadable="false" useHttpOnly="true" crossContext="true">
</Context>

在C:/测试中,我刚刚安排了一个bc.htm,看看它是否能够从上查阅。 但它没有工作。 相反,在C部分显示我指数.html:omcat-6.0.32webappsROOT http:// localhost:8090"rel=“nofollow” & 错误为404。

这里是我的卡塔里纳语:

INFO: Deploying configuration descriptor ROOT.xml
Jan 15, 2012 11:16:25 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jan 15, 2012 11:16:25 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jan 15, 2012 11:16:25 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/19  config=null
Jan 15, 2012 11:16:25 PM org.apache.catalina.core.StandardService start
INFO: Starting service testing
Jan 15, 2012 11:16:25 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
Jan 15, 2012 11:16:25 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor testing.xml
Jan 15, 2012 11:16:25 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Jan 15, 2012 11:16:25 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8090
Jan 15, 2012 11:16:25 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8092
Jan 15, 2012 11:16:25 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16  config=null
Jan 15, 2012 11:16:25 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 510 ms

谁能告诉我什么错了?

最新资料:我刚刚注意到,如果我把指数.html放在C:omcat-6.0.32webappsDirectory,可在上查阅。 现在,谁能帮助我如何确定这一点,以便我能够把指数.html放在其他目录中?

感谢!

问题回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签