English 中文(简体)
喷气6指数.html欢迎页不工作
原标题:jetty 6 index.html welcome page not working

我认为,伊姆会站不住脚,但我无法得到一个简单的缺省指数。

网址上界定的根本背景

<servlet-mapping>
    <servlet-name>jersey-servlet</servlet-name>
    <url-pattern>/*</url-pattern>
</servlet-mapping>

我欢迎以下文件:

<welcome-file-list>
   <welcome-file>index.html</welcome-file>
</welcome-file-list>

但是,在进入。 i 达到404。 国家统计学会在为我所失踪的那儿做些什么? 吗? 做些事情,我知道,但仍在做事。

感谢

最佳回答

你的提问中没有足够的信息可保证100%,但我怀疑你会再次陷入“需要实际存在”的问题。

This page provides more details, including how to overcome the problem: http://web.archive.org/web/20150520205320/https://docs.codehaus.org/display/JETTY/Welcome+files+not+working

简短的解释是,在缺席的情况下,该喷气式不会将电灯视作对welcome-file的配对器,除非还有实际档案。

The reason for this, is that JSPs are implemented as a servlet, and if Jetty matched welcome files just because there was a servlet-mapping match, then index.jsp would always match as a welcome file, but you only want that to happen if there really is an index.jsp file.

问题回答

暂无回答




相关问题
Can t access locally hosted project via the internet?

I m currently developing a Java Servlet Project in Eclipse. The project is compiled via Tomcat 5.5 and hosted in localhost:8080(alternatively 127.0.0.1:8080 AND 192.168.1.10:8080 which also happens ...

JSP programmatically render

I need to programmatically render JSP page. As far as I understand, JSP should have some compiler. The question is can I use this compiler dirrectly without JspServlet and others? All I need is ...

Javascript redirect

I am working with javascript and here is what I am trying to do: 1. Send a get request which looks like "http://localhost:8080/myapp/verify.htm?verifyId=Agkvhs" My requests reaches my verify.jsp in ...

热门标签