You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by Yazad Khambata <ya...@gmail.com> on 2017/06/05 04:53:44 UTC

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

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