관리 메뉴

거니의 velog

(17) Tomcat Servers 설정 본문

대덕인재개발원_final project

(17) Tomcat Servers 설정

Unlimited00 2024. 1. 5. 16:03

1. 2MB 이상의 파일을 업로드 하기 위한 설정

    <!-- 2MB 이상의 파일을 업로드 하기 위한 설정, maxPostSize="5242800", 50MB / maxSwallowSize="-1" 설정할 것! -->
    <Connector connectionTimeout="20000" maxParameterCount="1000" maxPostSize="524288000" maxSwallowSize="-1" port="80" 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"
               maxParameterCount="1000"
               />
    -->

2. multipart 설정

<?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.
--><!-- The contents of this file will be loaded for each web application -->
<Context allowCasualMultipartParsing="true" path="/">

    <!-- Default set of monitored resources. If one of these changes, the    -->
    <!-- web application will be reloaded.                                   -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->
</Context>

 

'대덕인재개발원_final project' 카테고리의 다른 글

(19) 보강 12  (0) 2024.01.08
(18) 토요일 수업 3  (0) 2024.01.08
(16) 보강 11  (0) 2024.01.05
(15) Oracle SQL 쿼리문  (2) 2024.01.04
(14) 보강 10  (2) 2024.01.04