I'm trying to get Groovy running inside Tomcat with clean urls. Since my knowledge of Tomcat's url mapping and filters is quite limited, I'm running into a brick wall.
What I'd like is to create a front-controller called index.groovy
that handles all incoming requests. The problem is that I can't seem to figure out how to create the correct web.xml
mappings. This is what I currently have (which is pretty much standard):
<servlet>
<servlet-name>Groovy</servlet-name>
<servlet-class>groovy.servlet.GroovyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Groovy</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
If I now try to access my instance with the following url, I get a 404
.
http://localhost:8080/GroovyTest/index.groovy/test
Of course, ideally I'd like the index.groovy
script to be executed where I can pick up the rest of the path.