【发布时间】:2014-09-08 20:56:38
【问题描述】:
http://localhost:8080/正确返回正常的tomcat管理页面。
我的主机文件:
127.0.0.1 接口
http://api:8080/index.html 得到一个空白页(萤火虫报告 404)
我的应用程序位于单独的位置:/html/API/API
我将此添加到 server.xnl
<Host name="api"
unpackWARs="true" autoDeploy="true"
appBase="/html/API/API/web" >
</Host>
我的 web.xml 是:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
index.html的路径是:/html/API/API/web/index.html
我在 Netbeans 中进行了设置,如果这有影响的话。
我似乎无法摆脱这个空白页面并正确显示 index.html
编辑: 这有效:
<Host name="api"
unpackWARs="true" autoDeploy="true"
appBase="/html/API/API/dist" >
<Context path="/" docBase="/html/API/API/build/web" reloadable="true">
</Context>
</Host>
【问题讨论】:
标签: tomcat