tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TFoh...@t-online.de (Torsten Fohrer)
Subject Re: [PATCH] Setting TagHandlerPool size as InitParameter for jasper servlet
Date Sat, 16 Nov 2002 07:52:38 GMT

i write it yesterday without any build env. 

sorry, for the work...



On Saturday 16 November 2002 05:22, Jan Luehe wrote:
> Torsten,
>
> I've applied your patch.
>
> However, I found the following issues with it:
> > PATCH Content:
> >  Adding handling of init parameter "tagPoolSize"
> >  Changing Generator to use tagPoolSize for initialize TagHandlerPool
> >
> > This should, hopefully, be correctly formatted.
> >
> > Index: resources/messages.properties
> > ===================================================================
> > +jsp.warning.tagpoolsize=Warning: Invalid value for the initParam
> > tagpoolsize. Will use the default value of \"5\"
>
> Instead of hardcoding the default pool size in the error message, I
> pass it as an argument.
>
> Also, instead of specifying the default pool size in several places
> (which could get out-of-sync), I now declare it in a single place
> (org.apache.jasper.Constants.MAX_POOL_SIZE).
>
> > Index: EmbededServletOptions.java
> > ===================================================================
> > +        String tagPoolSize = config.getInitParameter("tagPoolSize");
>
> I don't think it is a good idea in general to have an instance and a
> local variable with the same name (in this case: "tagPoolSize"). I've
> renamed the above "tagPoolSize" to "tagPoolSizeParam".
>
> > +        if (checkInterval != null) {
>
> "checkInterval" should be "tagPoolSize".
>
> > Index: Options.java
> > ===================================================================
> >      /**
> > +     * Size of the tag handler pool.
> > +     */
> > +    public int getTagPoolSize();
>
> An implementation of this method also must be added to
> org.apache.jasper.JspC, which implements the Options interface.
>
> > Index: compiler/Generator.java
> > ===================================================================
> > -	    out.println(" = new org.apache.jasper.runtime.TagHandlerPool();");
> > +	    out.print(" = new org.apache.jasper.runtime.TagHandlerPool(");
> > +         out.print( ctxt.getOptions().getTagPoolSize());
>
> This didn't compile, because there currently is no
> ServletWriter.print() method that takes an int. I added one.
>
> I also added a description of the new "tagPoolSize" init param to
> the default web.xml.
>
>
> Jan
>
>
> --
> To unsubscribe, e-mail:  
> <mailto:tomcat-dev-unsubscribe@jakarta.apache.org> For additional commands,
> e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


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


Mime
View raw message