`
Algernoon
  • 浏览: 23642 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

tomcat配置文件下载服务

    博客分类:
  • web
 
阅读更多

tomcat 配置文件下载服务

 

conf里面的server.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
--><!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 --><Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
  <!-- Security listener. Documentation at /docs/config/listeners.html
  <Listener className="org.apache.catalina.security.SecurityListener" />
  -->
  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/>
  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
  <Listener className="org.apache.catalina.core.JasperListener"/>
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>

  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">

    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="150" minSpareThreads="4"/>
    -->


    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    -->
    <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->
    <!-- Define a SSL HTTP/1.1 Connector on port 8443
         This connector uses the BIO implementation that requires the JSSE
         style configuration. When using the APR/native implementation, the
         OpenSSL style configuration is required as described in the APR/native
         documentation -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />
    -->

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>


    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->

    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <Engine defaultHost="localhost" name="Catalina">

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->

      <!-- Use the LockOutRealm to prevent attempts to guess user passwords
           via a brute-force attack -->
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <!-- This Realm uses the UserDatabase configured in the global JNDI
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
             available for use by the Realm.  -->
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
      </Realm>

      <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log." suffix=".txt"/>

	  <Context docBase="D:\article\audios" path="/audios" crossContext="false" debug="0" reloadable="true"/>
   	  <Context docBase="D:\article\pics" path="/pictures" reloadable="false"/>
      <Context docBase="xindu" path="/xindu" reloadable="true" source="org.eclipse.jst.jee.server:xindu"/></Host>
    
    </Engine>
  </Service>
</Server>

 

 tomcat中的web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:jsp="http://java.sun.com/xml/ns/javaee/jsp" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>Archetype Created Web Application</display-name>
  <context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>xindu</param-value>
  </context-param>
  <context-param>
    <param-name>log4jConfigLocation</param-name>
    <param-value>classpath:log4j.properties</param-value>
  </context-param>
  <context-param>
    <param-name>log4jRefreshInterval</param-name>
    <param-value>6000</param-value>
  </context-param>
  <jsp-config>
    <taglib>
      <taglib-uri>http://www.biiway.com/tags</taglib-uri>
      <taglib-location>/WEB-INF/bw.tld</taglib-location>
    </taglib>
  </jsp-config>
  <listener>
    <listener-class>
   org.springframework.web.util.Log4jConfigListener
  </listener-class>
  </listener>
  <filter>
    <filter-name>encodingFilter</filter-name>
    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
    <init-param>
      <param-name>encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>encodingFilter</filter-name>
    <url-pattern>/</url-pattern>
  </filter-mapping>
  <servlet>
    <servlet-name>springMVC</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
      <param-name>detectAllHandlerExceptionResolvers</param-name>
      <param-value>false</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>springMVC</servlet-name>
    <url-pattern>/</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>imageRandServlet</servlet-name>
    <servlet-class>com.biiway.xindu.faceapi.ImageRandServlet</servlet-class>
  </servlet> 
  <servlet-mapping>
    <servlet-name>imageRandServlet</servlet-name>
    <url-pattern>/servlet/imageRandServlet</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>DruidStatView</servlet-name>
    <servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>DruidStatView</servlet-name>
    <url-pattern>/druid/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.jpg</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.js</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.xml</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.css</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.png</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.JPG</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.gif</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.swf</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.html</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.json</url-pattern>
  </servlet-mapping>
  <error-page>
    <error-code>404</error-code>
    <location>/error/404.jsp</location>
  </error-page>
  <error-page>
    <error-code>500</error-code>
    <location>/error/500.jsp</location>
  </error-page>
  <welcome-file-list>
    <welcome-file>/admin/index.jsp</welcome-file>
  </welcome-file-list>
  <mime-mapping>
    <extension>xls</extension>
    <mime-type>application/vnd.ms-excel</mime-type>
  </mime-mapping>
</web-app>

 

分享到:
评论

相关推荐

    tomcat及其配置文件

    【标题】:“Tomcat及其配置文件” 在Java Web开发领域,Tomcat是一个广泛使用的开源应用服务器,它专注于Servlet和JSP的应用。Tomcat是Apache软件基金会的Jakarta项目的一部分,作为一个轻量级的Web服务器和...

    tomcat 配置文件

    tomcat 配置文件 tomcat 配置文件tomcat 配置文件tomcat 配置文件

    tomcat配置文件详解

    资源名称:tomcat配置文件详解   资源截图: 资源太大,传百度网盘了,链接在附件中,有需要的同学自取。

    tomcat配置文件(win32+win64)

    在Windows环境下,无论是32位还是64位操作系统,都需要适配对应的Tomcat配置文件来确保其正常运行。 在配置Tomcat时,有几个关键的文件和目录需要注意: 1. **bin目录**:包含了启动和停止Tomcat的脚本,如`...

    tomcat集群-Apache2.2.4+And+mod_jk.so+tomcat配置文件

    总结来说,"tomcat集群-Apache2.2.4+And+mod_jk.so+tomcat配置文件"的配置涉及到多个步骤,包括Apache和Tomcat的安装、mod_jk模块的集成、配置文件的修改以及负载均衡策略的设定。这个过程对于构建高可用、高性能的...

    apache和tomcat整合配置文件

    3. **server.xml**:这是Tomcat服务器的主要配置文件,它定义了Tomcat的各个组件,如Connector(连接器)和Context(上下文)。在整合过程中,我们可能需要调整以下部分: - 修改或者添加AJP Connector,因为Apache...

    一台服务器多个tomcat配置

    为了避免这些冲突,需要修改 Tomcat 配置文件。下面是详细的配置过程: 一、下载和解压 Tomcat 首先,需要下载 Tomcat 的安装包,例如 Tomcat-6.0.37。然后,解压该安装包到某个目录下,例如 D 盘根目录下。将解压...

    Tomcat 配置文件数据库密码加密

    Tomcat 配置文件数据库密码加密,增加factory属性和修改context.xml文件中密码为密文,在lib文件中添加自定义的factory类 代码是jdk1.8版本,包含简单的加密类和http请求,如果使用简单的加密,不需要引用额外的lib...

    Tomcat配置方法 Tomcat配置方法 Tomcat配置方法

    2. **server.xml**:这是Tomcat的主要配置文件,定义了服务器的端口(如HTTP的8080,HTTPS的8443)、服务、连接器和引擎等。你可以根据需要更改这些设置。 3. **context.xml**:每个Web应用可以有自己特定的上下文...

    tomcat 实现文件上传下载

    在Struts2的配置文件(struts.xml)中,你需要添加对应的拦截器栈,并在Action类中定义一个字段来接收上传的文件。例如: ```xml &lt;result name="success"&gt;/success.jsp &lt;result name="input"&gt;...

    apache+tomcat配置文件

    在下载的“apache+tomcat配置文件”中,可能包含了这些配置的示例或模板,可以直接使用或作为参考来配置自己的环境。确保在实际部署前,根据自身的硬件资源和应用需求进行适当的调整,以达到最佳的运行效果。在部署...

    drools tomcat 配置文件

    drools里面的 bin和config和lib文件,已经可以跑,中接有 drools web 和kie service

    tomcat的启动的配置文件

    启动配置文件tomcat的配置文件,仅供参考

    调整后的Tomcat配置文件.rar

    标题"调整后的Tomcat配置文件.rar"表明这是一个包含了调整过的Tomcat服务器配置文件的压缩包。这通常意味着文件中可能包含了针对性能优化、安全增强或者特定功能配置的修改。 描述提到的"《程序猿必须知道的关于 ...

    TOMCAT6日志配置JAR包及配置文件

    本资源包“TOMCAT6日志配置JAR包及配置文件”专门针对Tomcat6,提供了最新的日志配置JAR包和相应的配置文件,旨在帮助用户更便捷地管理和理解其日志系统。 Tomcat6是Apache软件基金会的Tomcat服务器的一个版本,它...

    Tomcat配置文件server.xml说明.doc

    Tomcat配置文件server.xml说明.doc

    公司tomcat文件配置

    公司tomcat相关项目配置及内存配置等

    上传war文件大小超过Tomcat7最大文件限制报错

    ### 上传WAR文件大小超过Tomcat 7最大文件限制报错 ...综上所述,通过调整Tomcat的配置文件可以解决WAR文件大小超过最大文件限制的问题,但在实施过程中需要注意资源利用、性能以及安全性等方面的因素。

    Tomcat+IIS整合配置文件

    "Tomcat+IIS整合配置文件"的标题和描述指向了一个特定的场景:将Apache Tomcat(一个流行的Java Servlet容器)与Microsoft IIS(互联网信息服务)集成,以实现更高效的Web服务。这种整合通常用于在同一个服务器上...

    tomcat动态配置文件

    xml放在tomcat的conf下面的localhost文件夹下,不用再每次部署项目

Global site tag (gtag.js) - Google Analytics