Tomcat starts normally in eclipse, but cannot display the home page

Source: Internet
Author: User
Tags xmlns tomcat

Today, I tried to build the struts2 environment and wrote the first –helloworld of the Struts program. The environment is set up very smoothly, mainly divided into 3 steps: Introduce jar package, write struts.xml, configure Web. Xml. For details, please refer to: http://www.blogjava.net/lzhidj/archive/2008/07/08/213445.html

But there is one problem: Tomcat can start successfully, but it is "this program cannot display Web pages". Post-Search Solutions:
Http://www.mamicode.com/info-detail-492134.html.
The main reason is that the server path of the Tomcat configuration is not the installation path for Tomcat, and you choose to use Tomcat installation. Deployment Path Select WebApps.
The problem really bothered me for a few hours.

In addition, there is the Web

<?xml version= "1.0" encoding= "UTF-8"?> <web-app xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance" xmlns= "Http://xmlns.jcp.org/xml/ns/javaee" xsi:schemalocation= "Http://xmlns.jcp.org/xml/ns/javaee/http Xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd "id=" webapp_id "version=" 3.1 "> <display-name>struts</ display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-l ist> <context-param> <param-name>contextConfigLocation</param-name> <param-value>clas spath:applicationcontext*.xml</param-value> </context-param> <listener> <listener-class>o Rg.springframework.web.context.contextloaderlistener</listener-class> </listener> <filter> < Filter-name>struts2</filter-name> <filter-class> Org.apache.struts2.dispatcher.ng.filter.strutsprepareandexecutefilter</filter-class> </filter> < Filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filte R-mapping> </web-app>

Both the

Listener and Fliter are written. The teacher in the presentation, also did not write, but there is no problem, doubt.

Related Article

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.