[Java EE] web application directory structure & Configure a virtual host

Source: Internet
Author: User

MyWebSite

|

|-- Static Resources and JSP files can be placed directly in the Web application directory, the browser can directly access

|--Web-inf Browser has no way to directly access

|--classes class file for dynamic Web runtime ,java class

|--lib dynamic Web Resource runtime depends on the jar Package

|--web.xml the entire web configuration file, configure the home page,Servlet mappings, filters, listener configuration

Xml

Configuring a virtual Host

Add a host, Add a <Host> node in Tomcat/confserver.xml, set the name and path name="" Appbase= ""

Modify the hosts file on this computer to test

Packaging the Web app war

use jar-cvf news.war under cmd command *

Copy this war packet directly to the webapps directory and extract it automatically.

Right-click Add to Zip Package, directly modify suffix to war effect is the same

Tomcat Management Platform

Configure the password, Configure it in the Conf/tomcat-users.xml file

<user username= "admin" password= "admin" roles= "Manager-gui"/>

[Java EE] web application directory structure & Configure a virtual host

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.