Jetty 6 index.html application page not working

I think I'm going crazy, but I can’t get a simple default index.html page to display in the dock.

The root context defined in web.xml

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

and I have a welcome file like:

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

But when I enter http: // localhost: 8182 / api / I get 404. This works FINE in tomcat, so what am I missing ??????????? I'm doing something dumb, I know, but still ... working on tomcat.

thanks

+4
source share
1 answer

There is not enough information in your question to be 100% sure, but I suspect that you are faced with the problem that "welcome files must actually exist."

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

A brief explanation is that by default, this version of Jetty will not treat the servlet as a suitable welcome file if the actual file also does not exist.

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

0
source

All Articles