Skip to Content
0
Aug 09, 2015 at 04:08 PM

Deployment of java servlet fails when changing url pattern in web.xml

549 Views

Hi community,

I'm currently playing around with Java servlets on HCP and I'm not overly familiar with that.

Currently, I have this piece of config in my web.xml:

<servlet-mapping>

<servlet-name>HelloWorldServlet</servlet-name>

<url-pattern>/*</url-pattern>

</servlet-mapping>

This works perfectly fine and my app is properly deployed. However, when I change the url pattern to something else (e.g. to / or /hello-world/*), the service remains in Starting state.

There's the following log entry:

Failed to start web application at context path '/HelloWorld'

org.eclipse.gemini.web.core.spi.ServletContainerException: Web application at '/HelloWorld' cannot be added to the host.

at org.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:128)

[...]

I can't really make sense of it. Does anyone have an idea about what might cause this?

Thanks,

Max