我想部署一个码头服务器。部署进展良好,我可以访问所有资源。但是我无法访问web根目录下的文件,具体是index.html。这里是我的配置:无法从码头访问index.html
的web.xml
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"
version="3.1">
org.springframework.web.context.ContextLoaderListener
contextConfigLocation
classpath*:/conf/my_spring/spring*.xml
REST Service
org.glassfish.jersey.servlet.ServletContainer
jersey.config.server.provider.packages
com.altin.api;com.fasterxml.jackson.jaxrs.json
jersey.config.server.provider.classnames
org.glassfish.jersey.media.multipart.MultiPartFeature
1
REST Service
/*
目录结构:
.
├── build.gradle
├── java-api.iml
├── resources
│ └── conf
│ └── my_spring
│ └── spring-config.xml
├── src
│ └── com
│ └── altin
│ └── api
│ └── base
│ ├── AuthenticationFilter.java
│ ├── PingRestAPI.java
│ └── config
│ └── spring
│ └── ApiSpringConfig.java
└── web
├── WEB-INF
│ └── web.xml
└── index.html
提取war样子:
$ tree -L 2
.
├── META-INF
│ └── MANIFEST.MF
├── WEB-INF
│ ├── classes
│ ├── lib
│ └── web.xml
└── index.html
application.wadl样子:
据我上下文路径为/,因为我标志着它在的IntelliJ根和还我能够访问/的ping资源。
但我无法访问index.html: