Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0-JSR-1
-
None
-
None
-
Tomcat :) (on 5.5.x)
Description
Tomcat, since 5.0 allows us to configure startup files ... So, here's what I did:
web.xml:
<servlet>
<servlet-name>groovy</servlet-name>
<servlet-class>groovy.servlet.GroovyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>groovy</servlet-name>
<url-pattern>*.groovy</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.jspx</welcome-file>
<welcome-file>index.groovy</welcome-file>
</welcome-file-list>
----------------
create a file called index.groovy, and don't keep any other files in the web-app, such as index.htm[l] etc ...
-----------------
invoke the webapp: http://localhost/webappname/
Tomcat shall invoke GroovyServlet, with a RequestURI parameter not containing .groovy ... this shall cause GroovyServlet to fail and throw a fatal exception. Also, the GroovyServlet assumes that all Groovy files must neccessarily end with .groovy .. is that right?
BTW, should GroovyServlet behave like JspServlet and compile .groovy files into real Groovelet s?