Ryan,
Here is my patch, although it isn't well tested or verified yet.
Mark
Hi Mark,
Thanks for the info. Open-source saves the day, again. :-)
-James
On Mon, Sep 23, 2002 at 03:57:13PM +0100, Geddes, Mark (ANTS) wrote:
> James,
>
> Tomcat 4.1.11 is an improvement over 4.1.10 (the pages compile). However
> there were still some problems. I made a small change to PagerTag which
> solved the issue for me. I think Jasper is caching tag classes where
> possible. The variable itemCount was not being reset between page
> invocations, so I reset it to zero in doStartTag().
>
> regards
>
> Mark
>
> public int doStartTag() throws JspException {
> if (url == null) {
> url = ((HttpServletRequest)pageContext.getRequest())
> .getRequestURI();
> int i = url.indexOf('?');
> if (i != -1)
> url = url.substring(0, i);
> }
>
> itemCount = 0;
> String tmp =
> pageContext.getRequest().getParameter(id+OFFSET_PARAM);
> if (tmp != null) {
> try {
> offset = Integer.parseInt(tmp);
> if (offset < 0)
> offset = 0;
> if (isOffset)
> itemCount = offset;
>
> } catch (NumberFormatException e) {
> e.printStackTrace();
> }
> }
>
> pageNumber = pageNumber(offset);
> pageNumberInteger = new Integer(1+pageNumber);
>
> pageContext.setAttribute(id+PAGE_NUMBER, pageNumberInteger);
> pageContext.setAttribute(id+OFFSET, new Integer(offset));
> pageContext.setAttribute(id+MAX_ITEMS, new
> Integer(maxItems));
>
> return EVAL_BODY_INCLUDE;
> }
>
> -----Original Message-----
> From: '[EMAIL PROTECTED]' [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 18, 2002 4:26 PM
> To: Geddes, Mark (ANTS)
> Subject: Re: tomcat 4.1.10
>
>
> Hi Mark,
>
> There was a bug discovered in in Tomcat 4.1.x which the pager tag library
> help ferret out. You might want to download a newer version of Tomcat,
they
> may have fixed it by now.
>
> Also, the source is included in the pager-taglib-1.1.jar.
>
> -James
>
> On Wed, Sep 18, 2002 at 02:25:03PM +0100, Geddes, Mark (ANTS) wrote:
> > James,
> >
> > Not sure if jsptags.com is still active but I was wondering if you have
> > tried the pager tags with tomcat 4.1.10 (Jasper2). My pages are failing
to
> > compile if I include both a <pg:prev> and <pg:next> tag. I'm sure its an
> > issue with the JSP compiler, but without access to the tag library
source,
> > it is difficult to debug. Any help appreciated - we have enjoyed using
> them.
> >
> > Regards
> >
> > Mark
-----Original Message-----
From: Ryan Cornia [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 4:32 PM
To: "'Tomcat Users List'"<[EMAIL PROTECTED]
Subject: Pager-taglib with Tomcat 4.1.12? Anyone got it working?
I'm using the pager-taglib from http://jsptags.com/tags/navigation/pager/.
The code worked fine in SilverStream and tomcat 4.0.4. When I try tomcat
4.1.12 however, the page displays correctly with the page tags the first
time the page is loaded after compile. If I hit refresh, or try and navigate
to a different pager offset, the page comes back with all the items blank.
Anyone have the pager-taglib working with tomcat 4.1.12? Did you have to
make some changes to the taglib somewhere to get it to work?
Thanks,
Ryan
***************************************************************************
This communication (including any attachments) contains confidential information. If
you are not the intended recipient and you have received this communication in error,
you should destroy it without copying, disclosing or otherwise using its contents.
Please notify the sender immediately of the error.
Internet communications are not necessarily secure and may be intercepted or changed
after they are sent. Abbey National Treasury Services plc does not accept liability
for any loss you may suffer as a result of interception or any liability for such
changes. If you wish to confirm the origin or content of this communication, please
contact the sender by using an alternative means of communication.
This communication does not create or modify any contract and, unless otherwise
stated, is not intended to be contractually binding.
Abbey National Treasury Services plc. Registered Office: Abbey National House, 2
Triton Square, Regents Place, London NW1 3AN. Registered in England under Company
Registration Number: 2338548. Regulated by the Financial Services Authority (FSA).
***************************************************************************
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>