GROOVY-5227 - AbstractHttpServlet should extend GenericServlet directly instead of HttpServlet

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

GROOVY-5227 - AbstractHttpServlet should extend GenericServlet directly instead of HttpServlet

Yazad Khambata
Hi Paul,

I have analyzed the ticket "GROOVY-5227 - AbstractHttpServlet should
extend GenericServlet directly instead of HttpServlet" and provided
Detailed Analysis, and suggested solutions on the ticket.

In brief,
1. We should NOT extends GenericServlet as asked in the ticket.
2. We must either not override service directly (as asked in the
ticket) or document this behavior, since by doing so,
2.a. We make it difficult for someone using GroovyServlet to extend
the servlet and do something specific when say the script is invoked
with POST or PUT isntead of GET. But this has a not-so-elegant
workaround - conditional code in the script using the implicit request
object's getMethod method.
2.b. We loose getLastModified which sends back 304 Not Modified
response header for efficiency, if nothing has changed.

Please see detailed info here,
https://issues.apache.org/jira/browse/GROOVY-5227?focusedCommentId=16036524&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16036524

Regards,
Yazad Khambata