tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Can jsp-file be a JspServlet init-param?
Date Thu, 09 Sep 2010 06:48:59 GMT
On 09/09/2010 00:54, David Jencks wrote:
> I've recently rewritten the geronimo-jetty integration to work off the servlet 3 *Registration
classes.  This works great except for servlets backed by jsp files, since there's no way to
tell the servlet container through the ServletRegistration interface that its actually something
with this extra jsp file name that needs to be added through some special process into the
request.

That looks like an oversight in the 3.0 spec.

> However, its easy to subclass the JspServlet so it gets the jsp file value from an init
param, and of course its easy to set the init param from the web.xml.  This appears to work
fine.
> 
> Is there some reason I've missed that this is a bad idea?

Well, it would be container specific rather than defined by the spec but
since the spec offers no way to define it, I don't see there is a choice.

> If not, would the jasper community consider a patch to modify the JspServlet so it directly
looks for such an init-param?

Patches always get considered.

> And would the tomcat community consider simplifying the runtime code to use this init-param
instead of a Constants.JSP_FILE request attribute?

As usual, it would depend on the patch.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message