The order of loading the class files in the jar files under the classes folder in the Java Web project and the jar files in the WEB-INF/lib

Source: Internet
Author: User

To publish to WebLogic, you can configure it in webcontent \ WEB-INF \ weblogic. xml.
The configuration is as follows:
<? XML version = "1.0" encoding = "UTF-8"?>
<Weblogic-web-app xmlns = "http://www.bea.com/ns/weblogic/90"
Xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemalocation = "http://java.sun.com/xml/ns/j2ee
Http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
Http://www.bea.com/ns/weblogic/90

Http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd>
<Container-Descriptor>
<! -- After modifying the jvav class, the jvav class does not automatically restart. In debug mode, the logic of the modification method does not need to be restarted. However, changing the method parameters can only be used after restart. -->
<Servlet-reload-check-secs>-1 </servlet-reload-check-secs>
<! -- <Resource-reload-check-secs>-1 </resource-reload-check-secs>
<! -- Web-INF/classes is better than lib loading -->
<Prefer-web-INF-classes> true </prefer-web-INF-classes> -->
</Container-Descriptor>
<! -- URL root path -->
<Context-root> </context-root>
<JSP-Descriptor>
<! -- View (Debug) the Java source file \ servers \ adminserver \ TMP \ _ wl_user \ webapp \ XXX \ jsp_servlet \ _ JSP \ _ compiled by JSP -->
<Keepgenerated> true </keepgenerated>
<! -- Do not restart the service to automatically load the modified JSP -->
<Page-check-seconds> 1 </page-check-seconds>
</JSP-Descriptor>
</Weblogic-web-app>

-----------------------------------------------------------------
classloader loading sequence at Tomcat startup
List of Tomcat class loading priorities
1. the first is the JAR file under $ java_home/JRE/lib/EXT.
2. jar and class files in the environment variable classpath.
3. $ class file under catalina_home/common/classes.
4. $ catalina_home/commons/endorsed JAR file.
5. $ catalina_home/commons/i18n.
6. $ catalina_home/common/lib.
(jar files such as the JDBC driver can be stored here, so that the JDBC driver cannot be found when the data source is configured in server. xml .)
7. $ class file under catalina_home/Server/classes.
jar files under 8. $ catalina_home/Server/lib.
9. $ catalina_base/shared/classes Class file.
10. $ catalina_base/shared/lib.
11. Their specific webapp/WEB-INF/classes class files.
12. Their specific jar files under webapp/WEB-INF/lib.

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.