Springmvc+maven+tomcat Configuring the configuration----2.tomcat

Source: Internet
Author: User

------------Tomcat\conf\context.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 is for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); Except in compliance with
The License. Obtain a copy of the License at

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

Unless required by applicable law or agreed to writing, software
Distributed under the License is distributed on a "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 is loaded for each Web application--><context>

<!--Default set of monitored resources--
<WatchedResource>WEB-INF/web.xml</WatchedResource>

<!--uncomment this to disable session persistence across Tomcat restarts-
<!--
<manager pathname= ""/>
-

<!--uncomment this to enable Comet connection tacking (provides events
On session expiration as well as WebApp lifecycle)--
<!--
<valve classname= "Org.apache.catalina.valves.CometConnectionManagerValve"/>
-
<!--
caused By:java.lang.NoSuchMethodException:org.apache.catalina.deploy.WebXml addfilter
The workaround is to add <loader delegate= "true"/> Property in Context.xml under Conf in the Tomcat directory.
After querying the data, this property has the following meanings.
True, which means that Tomcat will follow the delegate mechanism of the JVM, that is, when a WebappClassLoader loads the class file, it is handed to the Sharedclassloader load, Sharedclassloader fails to load successfully, will continue to delegate to its own parent class, until Bootstarpclassloader, and if none of the loads succeed, it is finally loaded by WebappClassLoader itself.
False, which means that the delegate mechanism will not be followed, that is, when WebappClassLoader loads the class file, it takes precedence to load itself, and if the load fails, it follows the inheritance chain, which in turn delegates the parent class to load.
-
<loader delegate= "true"/>

</Context>

-----------------------------------------Tomcat\conf\tomcat-users.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 is for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); Except in compliance with
The License. Obtain a copy of the License at

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

Unless required by applicable law or agreed to writing, software
Distributed under the License is distributed on a "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.
--><tomcat-users>
<!--
Note:by default, no user is included in the "Manager-gui" role required
To operate the "/manager/html" Web application. If you wish the use of this app,
You must define such a user-the username and password is arbitrary. It is
Strongly recommended that's don't use one of the users in the commented out
section below since they is intended for use with the examples web
Application.
-
<!--
Note:the sample user and role entries below is intended for use with the
Examples Web application. They is wrapped in a comment and thus is ignored
When reading the this file. If you wish to configure these users
Examples Web application, don't forget to remove the <!.. .. > that surrounds
them. You'll also need to set the passwords to something appropriate.
-
<!--
<role rolename= "Tomcat"/>
<role rolename= "Role1"/>
<user username= "Tomcat" password= "<must-be-changed>" roles= "Tomcat"/>
<user username= "Both" password= "<must-be-changed>" roles= "Tomcat,role1"/>
<user username= "Role1" password= "<must-be-changed>" roles= "Role1"/>
-

<role rolename= "Admin-gui"/>
<role rolename= "Admin-script"/>
<role rolename= "Manager-gui"/>
<role rolename= "Manager-script"/>
<role rolename= "Manager-jmx"/>
<role rolename= "Manager-status"/>
<role rolename= "maven"/>

<user username= "admin" password= "admin" roles= "manager-gui,manager-script,manager-jmx,manager-status, Admin-script,admin-gui,maven "/>
<user username= "maven" password= "123456" roles= "Manager-gui,manager-script,manager-jmx,manager-status, Admin-script,admin-gui,maven "/>

</tomcat-users>

----------------------------------------Tomcat\conf\catalina\localhost\manager.xml---------------------------- -------------

<?xml version= "1.0" encoding= "UTF-8"?>
<context privileged= "true" antiresourcelocking= "false"
Docbase= "${catalina.home}/webapps/mavendemo"
Path= "${catalina.home}/webapps/mavendemo"
Reloadable= "true" >
<valve classname= "Org.apache.catalina.valves.RemoteAddrValve" allow= "^.*$"/>
</Context>

Springmvc+maven+tomcat Configuring the configuration----2.tomcat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.