RE: Custom Tag Lib

2003-08-14 Thread Mike Cherichetti \(Renegade Internet\)
Hi Shawn,

Actually, I wasn't aware that there was an option to disable it.  When I
figured out what was happening, I went ahead and handled it in my code.  No
telling how other application servers might handle it.  If you're only going
to be deploying on Tomcat, disabling pooling would probably save you some
time, but you still might want to handle it in your code to get better
performance.

Mike

-Original Message-
From: Shawn Zernik [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 11:41 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Custom Tag Lib


Mike:

Thanks so very much...  I saw their is a config option in the Jasper to
turn off tag pooling.  do you thing that would work too, of shouldI
impliment it in my source code.  I'm gonna take a look at it right now.

Shawn

-Original Message-
From: Mike Cherichetti (Renegade Internet)
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:28 PM
To: Tomcat Users List
Subject: RE: Custom Tag Lib


Shawn,

I ran into this problem as well when switching from 4.0 to 4.1.  I think it
has something to do with 4.1 pooling and re-using tag objects.  What I did
in all of my doStartTag(), doAfterBody(), etc... methods was manually call
release() to reset the data in the tags like so:

public int doStartTag() throws JspException
{
  try
  {
...
  }

  catch (Exception exception)
  {
throw new JspException(exception);
  }

  finally
  {
release();
  }

  return SKIP_BODY;
}

Have a nice day ...

Sincerely,

Mike Cherichetti
Renegade Internet
Internet Advertising Delivery Solutions
www.renegadeinternet.com
Phone (724) 658-6346
Fax (724) 658-6346


-Original Message-
From: Shawn Zernik [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:56 PM
To: [EMAIL PROTECTED]
Subject: Custom Tag Lib


Tomcat Users:

I've been fighting with some version differences in tom cat wondering why my
app acts severly different on Tomcat 4.1.27 then 4.0.6.  It appears that
4.1.27 is not working from my perspective, and have been fighting with it
since monday.  None of the books I have touch this subject or ellude to the
problem, and I've seached high and low for solutions.

I'm having a problem working with my custom tag library.  The stange part to
this is it appears to work on tomcat 4.0.6 but not on 4.1.27.  The library
has a tage called site that extends a base tag, and those tags use other
classes in my data namespace to hit a database.

The tags are returning the proper data in both versions, but in 4.1.27, I
have to "reload" the contect in the manager for it to "register" the changes
from the database.  I have added some printlns to std out to track what's
going on.  In tomcat 4.0.6 they are going through all the code as I would
exspect it to.  I have included each of the class files that are called.  I
have also included the printouts from both versions of tomcat to clierify
how each version is handling the calls.

The object hiarchey goes as follows:

jPublish.Tags site extends inc_tag.
jPublish.Data.site_manager extends jPublish.Data.manager, managers contain,
load, and fill datas.
jPublish.Data.site_data extends jPublish.Data.data, used for storing data
and tracking updates.


--- INDEX.JSP ---
<%@ page contentType="text/html" %>
<%@ taglib prefix="inc" uri="inc" %>





Welcome to !
© 



--- TOMCAT 4.0.6 STDOUT ---
Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
Starting service Tomcat-Apache
Apache Tomcat/4.0.6
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Shawn
jPublish.Tags.site.doEndTag(): End

RE: Custom Tag Lib

2003-08-14 Thread Angus Mezick
Shawn,
Bingo, you got it (in reguards to how to use release())

Right about doStartTag and doEndTag.  Just make user you NEVER change a
property that is set through a tag attribute.  This is what causes most
people's problems.  Never use a property's set method.  Reserve this for
container use only. (And don't go sneaking around the set method and do
property=foo; either ;)

Session objects are pooled I think.  I don't think your objects are
pooled though.
--Angus

> -Original Message-
> From: Shawn Zernik [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 08, 2003 12:11 PM
> To: Tomcat Users List
> Subject: RE: Custom Tag Lib
> 
> 
> Mr. Mezick:
> 
> >From what I'm gathering, the release should not be 
> implimented to reset the
> data and classes used by a tag, but only for things like 
> closing files and
> db connections? Just to make sure I'm thinking about this 
> properly, the
> doStartTag should be treated like the constructor: make sure 
> my data is
> setup properly there. The doEndTag should be used for 
> "normal" completion
> without errors.
> 
> Does Tomcat impliment object pooling beyon the tags?  Are my 
> supporting
> classes for the tag pooled?
> 
> Thanks to all who have helped me.
> 
> Shawn
> 
> -Original Message-
> From: Angus Mezick [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 08, 2003 8:06 AM
> To: Tomcat Users List
> Subject: RE: Custom Tag Lib
> 
> 
> It would be best if you went a rewrote your tags not to 
> require release
> to be called.  That change will also bring you in-line with the jsp
> spec.  These links might help:
> http://www.onjava.com/lpt/a/1248
> http://www.onjava.com/lpt/a/1250
> http://jakarta.apache.org/taglibs/guidelines.html
> 
> > -----Original Message-
> > From: Shawn Zernik [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 07, 2003 11:41 PM
> > To: Tomcat Users List; [EMAIL PROTECTED]
> > Subject: RE: Custom Tag Lib
> >
> >
> > Mike:
> >
> > Thanks so very much...  I saw their is a config option in
> > the Jasper to
> > turn off tag pooling.  do you thing that would work too, of shouldI
> > impliment it in my source code.  I'm gonna take a look at it
> > right now.
> >
> > Shawn
> >
> > -Original Message-
> > From: Mike Cherichetti (Renegade Internet)
> > [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 07, 2003 10:28 PM
> > To: Tomcat Users List
> > Subject: RE: Custom Tag Lib
> >
> >
> > Shawn,
> >
> > I ran into this problem as well when switching from 4.0 to
> > 4.1.  I think it
> > has something to do with 4.1 pooling and re-using tag
> > objects.  What I did
> > in all of my doStartTag(), doAfterBody(), etc... methods was
> > manually call
> > release() to reset the data in the tags like so:
> >
> > public int doStartTag() throws JspException
> > {
> >   try
> >   {
> > ...
> >   }
> >
> >   catch (Exception exception)
> >   {
> > throw new JspException(exception);
> >   }
> >
> >   finally
> >   {
> > release();
> >   }
> >
> >   return SKIP_BODY;
> > }
> >
> > Have a nice day ...
> >
> > Sincerely,
> >
> > Mike Cherichetti
> > Renegade Internet
> > Internet Advertising Delivery Solutions
> > www.renegadeinternet.com
> > Phone (724) 658-6346
> > Fax (724) 658-6346
> >
> >
> > -Original Message-
> > From: Shawn Zernik [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 07, 2003 10:56 PM
> > To: [EMAIL PROTECTED]
> > Subject: Custom Tag Lib
> >
> >
> > Tomcat Users:
> >
> > I've been fighting with some version differences in tom cat
> > wondering why my
> > app acts severly different on Tomcat 4.1.27 then 4.0.6.  It
> > appears that
> > 4.1.27 is not working from my perspective, and have been
> > fighting with it
> > since monday.  None of the books I have touch this subject or
> > ellude to the
> > problem, and I've seached high and low for solutions.
> >
> > I'm having a problem working with my custom tag library.  The
> > stange part to
> > this is it appears to work on tomcat 4.0.6 but not on 4.1.27.
> >  The library
> > has a tage called site that extends a base tag, and those
> > tags use other
> > classes in my data namespace to hit a database.
> >
> > The tags are returning the proper data in both versions, but
> > in 4.1

RE: Custom Tag Lib

2003-08-14 Thread Shawn Zernik
Mike:

I can't resolve that problem.  can I impliment those tags as simple tags:
the JSP spec says that they will not be cached or reused.

Shawn

-Original Message-
From: Mike Cherichetti (Renegade Internet)
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:59 PM
To: Tomcat Users List
Subject: RE: Custom Tag Lib


Hi Shawn,

Actually, I wasn't aware that there was an option to disable it.  When I
figured out what was happening, I went ahead and handled it in my code.  No
telling how other application servers might handle it.  If you're only going
to be deploying on Tomcat, disabling pooling would probably save you some
time, but you still might want to handle it in your code to get better
performance.

Mike

-Original Message-
From: Shawn Zernik [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 11:41 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Custom Tag Lib


Mike:

Thanks so very much...  I saw their is a config option in the Jasper to
turn off tag pooling.  do you thing that would work too, of shouldI
impliment it in my source code.  I'm gonna take a look at it right now.

Shawn

-Original Message-
From: Mike Cherichetti (Renegade Internet)
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:28 PM
To: Tomcat Users List
Subject: RE: Custom Tag Lib


Shawn,

I ran into this problem as well when switching from 4.0 to 4.1.  I think it
has something to do with 4.1 pooling and re-using tag objects.  What I did
in all of my doStartTag(), doAfterBody(), etc... methods was manually call
release() to reset the data in the tags like so:

public int doStartTag() throws JspException
{
  try
  {
...
  }

  catch (Exception exception)
  {
throw new JspException(exception);
  }

  finally
  {
release();
  }

  return SKIP_BODY;
}

Have a nice day ...

Sincerely,

Mike Cherichetti
Renegade Internet
Internet Advertising Delivery Solutions
www.renegadeinternet.com
Phone (724) 658-6346
Fax (724) 658-6346


-Original Message-
From: Shawn Zernik [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:56 PM
To: [EMAIL PROTECTED]
Subject: Custom Tag Lib


Tomcat Users:

I've been fighting with some version differences in tom cat wondering why my
app acts severly different on Tomcat 4.1.27 then 4.0.6.  It appears that
4.1.27 is not working from my perspective, and have been fighting with it
since monday.  None of the books I have touch this subject or ellude to the
problem, and I've seached high and low for solutions.

I'm having a problem working with my custom tag library.  The stange part to
this is it appears to work on tomcat 4.0.6 but not on 4.1.27.  The library
has a tage called site that extends a base tag, and those tags use other
classes in my data namespace to hit a database.

The tags are returning the proper data in both versions, but in 4.1.27, I
have to "reload" the contect in the manager for it to "register" the changes
from the database.  I have added some printlns to std out to track what's
going on.  In tomcat 4.0.6 they are going through all the code as I would
exspect it to.  I have included each of the class files that are called.  I
have also included the printouts from both versions of tomcat to clierify
how each version is handling the calls.

The object hiarchey goes as follows:

jPublish.Tags site extends inc_tag.
jPublish.Data.site_manager extends jPublish.Data.manager, managers contain,
load, and fill datas.
jPublish.Data.site_data extends jPublish.Data.data, used for storing data
and tracking updates.


--- INDEX.JSP ---
<%@ page contentType="text/html" %>
<%@ taglib prefix="inc" uri="inc" %>





Welcome to !
© 



--- TOMCAT 4.0.6 STDOUT ---
Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
Starting service Tomcat-Apache
Apache Tomcat/4.0.6
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
j

Re: Custom Tag Lib

2003-08-14 Thread Jon Wingfield
Yikes, calling release() in doStartTag() stops any state being 
accessible to child (body) tags. That would kill our custom iterator tags.
You could have your tags implement the TryCatchFinally interface, 
instead. That way you'll have a chance to reset state before reuse:
http://jakarta.apache.org/taglibs/guidelines.html

I've seen posts on this list saying that tag pooling has either made 
their site a dog or has given a huge positive performance gain. For our 
site, which has many tags per page, it is the latter case :) If you're 
thinking about turning pooling off you'll need to test the effects on 
performance.

Jon

PS We had to go through this process on the upgrade. I share your pain

Mike Cherichetti (Renegade Internet) wrote:
Shawn,

I ran into this problem as well when switching from 4.0 to 4.1.  I think it
has something to do with 4.1 pooling and re-using tag objects.  What I did
in all of my doStartTag(), doAfterBody(), etc... methods was manually call
release() to reset the data in the tags like so:
public int doStartTag() throws JspException
{
  try
  {
...
  }
  catch (Exception exception)
  {
throw new JspException(exception);
  }
  finally
  {
release();
  }
  return SKIP_BODY;
}
Have a nice day ...

Sincerely,

Mike Cherichetti
Renegade Internet
Internet Advertising Delivery Solutions
www.renegadeinternet.com
Phone (724) 658-6346
Fax (724) 658-6346
-Original Message-
From: Shawn Zernik [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:56 PM
To: [EMAIL PROTECTED]
Subject: Custom Tag Lib
Tomcat Users:

I've been fighting with some version differences in tom cat wondering why my
app acts severly different on Tomcat 4.1.27 then 4.0.6.  It appears that
4.1.27 is not working from my perspective, and have been fighting with it
since monday.  None of the books I have touch this subject or ellude to the
problem, and I've seached high and low for solutions.
I'm having a problem working with my custom tag library.  The stange part to
this is it appears to work on tomcat 4.0.6 but not on 4.1.27.  The library
has a tage called site that extends a base tag, and those tags use other
classes in my data namespace to hit a database.
The tags are returning the proper data in both versions, but in 4.1.27, I
have to "reload" the contect in the manager for it to "register" the changes
from the database.  I have added some printlns to std out to track what's
going on.  In tomcat 4.0.6 they are going through all the code as I would
exspect it to.  I have included each of the class files that are called.  I
have also included the printouts from both versions of tomcat to clierify
how each version is handling the calls.
The object hiarchey goes as follows:

jPublish.Tags site extends inc_tag.
jPublish.Data.site_manager extends jPublish.Data.manager, managers contain,
load, and fill datas.
jPublish.Data.site_data extends jPublish.Data.data, used for storing data
and tracking updates.
--- INDEX.JSP ---
<%@ page contentType="text/html" %>
<%@ taglib prefix="inc" uri="inc" %>




Welcome to !
© 


--- TOMCAT 4.0.6 STDOUT ---
Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
Starting service Tomcat-Apache
Apache Tomcat/4.0.6
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Shawn
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin

RE: Custom Tag Lib

2003-08-14 Thread Angus Mezick
TryCatchFinally is probably not only cleaner, but is also more spec
friendly.
--Angus

> -Original Message-
> From: Mike Cherichetti (Renegade Internet) 
> [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 08, 2003 12:42 PM
> To: Tomcat Users List
> Subject: RE: Custom Tag Lib
> 
> 
> I should have been more clear.  If you have tags without body 
> content, call
> release() at the end of doStartTag().  If you have tags with 
> body content,
> call release() at the end of doAfterBody().  This has worked 
> rather well for
> me.  Perhaps implement TryCatchFinally would be a little cleaner.
> 
> Mike
> 
> -Original Message-
> From: Jon Wingfield [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 08, 2003 5:08 AM
> To: Tomcat Users List
> Subject: Re: Custom Tag Lib
> 
> 
> Yikes, calling release() in doStartTag() stops any state being
> accessible to child (body) tags. That would kill our custom 
> iterator tags.
> You could have your tags implement the TryCatchFinally interface,
> instead. That way you'll have a chance to reset state before reuse:
> http://jakarta.apache.org/taglibs/guidelines.html
> 
> I've seen posts on this list saying that tag pooling has either made
> their site a dog or has given a huge positive performance 
> gain. For our
> site, which has many tags per page, it is the latter case :) If you're
> thinking about turning pooling off you'll need to test the effects on
> performance.
> 
> Jon
> 
> PS We had to go through this process on the upgrade. I share your pain
> 
> Mike Cherichetti (Renegade Internet) wrote:
> > Shawn,
> >
> > I ran into this problem as well when switching from 4.0 to 
> 4.1.  I think
> it
> > has something to do with 4.1 pooling and re-using tag 
> objects.  What I did
> > in all of my doStartTag(), doAfterBody(), etc... methods 
> was manually call
> > release() to reset the data in the tags like so:
> >
> > public int doStartTag() throws JspException
> > {
> >   try
> >   {
> > ...
> >   }
> >
> >   catch (Exception exception)
> >   {
> > throw new JspException(exception);
> >   }
> >
> >   finally
> >   {
> > release();
> >   }
> >
> >   return SKIP_BODY;
> > }
> >
> > Have a nice day ...
> >
> > Sincerely,
> >
> > Mike Cherichetti
> > Renegade Internet
> > Internet Advertising Delivery Solutions
> > www.renegadeinternet.com
> > Phone (724) 658-6346
> > Fax (724) 658-6346
> >
> >
> > -Original Message-
> > From: Shawn Zernik [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 07, 2003 10:56 PM
> > To: [EMAIL PROTECTED]
> > Subject: Custom Tag Lib
> >
> >
> > Tomcat Users:
> >
> > I've been fighting with some version differences in tom cat 
> wondering why
> my
> > app acts severly different on Tomcat 4.1.27 then 4.0.6.  It 
> appears that
> > 4.1.27 is not working from my perspective, and have been 
> fighting with it
> > since monday.  None of the books I have touch this subject 
> or ellude to
> the
> > problem, and I've seached high and low for solutions.
> >
> > I'm having a problem working with my custom tag library.  
> The stange part
> to
> > this is it appears to work on tomcat 4.0.6 but not on 
> 4.1.27.  The library
> > has a tage called site that extends a base tag, and those 
> tags use other
> > classes in my data namespace to hit a database.
> >
> > The tags are returning the proper data in both versions, 
> but in 4.1.27, I
> > have to "reload" the contect in the manager for it to "register" the
> changes
> > from the database.  I have added some printlns to std out 
> to track what's
> > going on.  In tomcat 4.0.6 they are going through all the 
> code as I would
> > exspect it to.  I have included each of the class files 
> that are called.
> I
> > have also included the printouts from both versions of 
> tomcat to clierify
> > how each version is handling the calls.
> >
> > The object hiarchey goes as follows:
> >
> > jPublish.Tags site extends inc_tag.
> > jPublish.Data.site_manager extends jPublish.Data.manager, managers
> contain,
> > load, and fill datas.
> > jPublish.Data.site_data extends jPublish.Data.data, used 
> for storing data
> > and tracking updates.
> >
> >
> > --- INDEX.JSP ---
> > <%@ page contentType="text/html" %>
> > <%@ taglib prefix="inc

RE: Custom Tag Lib

2003-08-14 Thread Mike Cherichetti \(Renegade Internet\)
Shawn,

I ran into this problem as well when switching from 4.0 to 4.1.  I think it
has something to do with 4.1 pooling and re-using tag objects.  What I did
in all of my doStartTag(), doAfterBody(), etc... methods was manually call
release() to reset the data in the tags like so:

public int doStartTag() throws JspException
{
  try
  {
...
  }

  catch (Exception exception)
  {
throw new JspException(exception);
  }

  finally
  {
release();
  }

  return SKIP_BODY;
}

Have a nice day ...

Sincerely,

Mike Cherichetti
Renegade Internet
Internet Advertising Delivery Solutions
www.renegadeinternet.com
Phone (724) 658-6346
Fax (724) 658-6346


-Original Message-
From: Shawn Zernik [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:56 PM
To: [EMAIL PROTECTED]
Subject: Custom Tag Lib


Tomcat Users:

I've been fighting with some version differences in tom cat wondering why my
app acts severly different on Tomcat 4.1.27 then 4.0.6.  It appears that
4.1.27 is not working from my perspective, and have been fighting with it
since monday.  None of the books I have touch this subject or ellude to the
problem, and I've seached high and low for solutions.

I'm having a problem working with my custom tag library.  The stange part to
this is it appears to work on tomcat 4.0.6 but not on 4.1.27.  The library
has a tage called site that extends a base tag, and those tags use other
classes in my data namespace to hit a database.

The tags are returning the proper data in both versions, but in 4.1.27, I
have to "reload" the contect in the manager for it to "register" the changes
from the database.  I have added some printlns to std out to track what's
going on.  In tomcat 4.0.6 they are going through all the code as I would
exspect it to.  I have included each of the class files that are called.  I
have also included the printouts from both versions of tomcat to clierify
how each version is handling the calls.

The object hiarchey goes as follows:

jPublish.Tags site extends inc_tag.
jPublish.Data.site_manager extends jPublish.Data.manager, managers contain,
load, and fill datas.
jPublish.Data.site_data extends jPublish.Data.data, used for storing data
and tracking updates.


--- INDEX.JSP ---
<%@ page contentType="text/html" %>
<%@ taglib prefix="inc" uri="inc" %>





Welcome to !
© 



--- TOMCAT 4.0.6 STDOUT ---
Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
Starting service Tomcat-Apache
Apache Tomcat/4.0.6
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Shawn
jPublish.Tags.site.doEndTag(): End

jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.

Custom Tag Lib

2003-08-14 Thread Shawn Zernik
Tomcat Users:

I've been fighting with some version differences in tom cat wondering why my
app acts severly different on Tomcat 4.1.27 then 4.0.6.  It appears that
4.1.27 is not working from my perspective, and have been fighting with it
since monday.  None of the books I have touch this subject or ellude to the
problem, and I've seached high and low for solutions.

I'm having a problem working with my custom tag library.  The stange part to
this is it appears to work on tomcat 4.0.6 but not on 4.1.27.  The library
has a tage called site that extends a base tag, and those tags use other
classes in my data namespace to hit a database.

The tags are returning the proper data in both versions, but in 4.1.27, I
have to "reload" the contect in the manager for it to "register" the changes
from the database.  I have added some printlns to std out to track what's
going on.  In tomcat 4.0.6 they are going through all the code as I would
exspect it to.  I have included each of the class files that are called.  I
have also included the printouts from both versions of tomcat to clierify
how each version is handling the calls.

The object hiarchey goes as follows:

jPublish.Tags site extends inc_tag.
jPublish.Data.site_manager extends jPublish.Data.manager, managers contain,
load, and fill datas.
jPublish.Data.site_data extends jPublish.Data.data, used for storing data
and tracking updates.


--- INDEX.JSP ---
<%@ page contentType="text/html" %>
<%@ taglib prefix="inc" uri="inc" %>





Welcome to !
© 



--- TOMCAT 4.0.6 STDOUT ---
Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
Starting service Tomcat-Apache
Apache Tomcat/4.0.6
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Shawn
jPublish.Tags.site.doEndTag(): End

jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
INC
jPublish.Tags.site.doEndTag(): End

--- TOMCAT 4.1.27 STDOUT: db INC then Shawn ---
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPu

RE: Custom Tag Lib

2003-08-14 Thread Shawn Zernik
Mr. Mezick:

>From what I'm gathering, the release should not be implimented to reset the
data and classes used by a tag, but only for things like closing files and
db connections? Just to make sure I'm thinking about this properly, the
doStartTag should be treated like the constructor: make sure my data is
setup properly there. The doEndTag should be used for "normal" completion
without errors.

Does Tomcat impliment object pooling beyon the tags?  Are my supporting
classes for the tag pooled?

Thanks to all who have helped me.

Shawn

-Original Message-
From: Angus Mezick [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 8:06 AM
To: Tomcat Users List
Subject: RE: Custom Tag Lib


It would be best if you went a rewrote your tags not to require release
to be called.  That change will also bring you in-line with the jsp
spec.  These links might help:
http://www.onjava.com/lpt/a/1248
http://www.onjava.com/lpt/a/1250
http://jakarta.apache.org/taglibs/guidelines.html

> -Original Message-
> From: Shawn Zernik [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 07, 2003 11:41 PM
> To: Tomcat Users List; [EMAIL PROTECTED]
> Subject: RE: Custom Tag Lib
>
>
> Mike:
>
> Thanks so very much...  I saw their is a config option in
> the Jasper to
> turn off tag pooling.  do you thing that would work too, of shouldI
> impliment it in my source code.  I'm gonna take a look at it
> right now.
>
> Shawn
>
> -Original Message-
> From: Mike Cherichetti (Renegade Internet)
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 07, 2003 10:28 PM
> To: Tomcat Users List
> Subject: RE: Custom Tag Lib
>
>
> Shawn,
>
> I ran into this problem as well when switching from 4.0 to
> 4.1.  I think it
> has something to do with 4.1 pooling and re-using tag
> objects.  What I did
> in all of my doStartTag(), doAfterBody(), etc... methods was
> manually call
> release() to reset the data in the tags like so:
>
> public int doStartTag() throws JspException
> {
>   try
>   {
> ...
>   }
>
>   catch (Exception exception)
>   {
> throw new JspException(exception);
>   }
>
>   finally
>   {
> release();
>   }
>
>   return SKIP_BODY;
> }
>
> Have a nice day ...
>
> Sincerely,
>
> Mike Cherichetti
> Renegade Internet
> Internet Advertising Delivery Solutions
> www.renegadeinternet.com
> Phone (724) 658-6346
> Fax (724) 658-6346
>
>
> -Original Message-
> From: Shawn Zernik [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 07, 2003 10:56 PM
> To: [EMAIL PROTECTED]
> Subject: Custom Tag Lib
>
>
> Tomcat Users:
>
> I've been fighting with some version differences in tom cat
> wondering why my
> app acts severly different on Tomcat 4.1.27 then 4.0.6.  It
> appears that
> 4.1.27 is not working from my perspective, and have been
> fighting with it
> since monday.  None of the books I have touch this subject or
> ellude to the
> problem, and I've seached high and low for solutions.
>
> I'm having a problem working with my custom tag library.  The
> stange part to
> this is it appears to work on tomcat 4.0.6 but not on 4.1.27.
>  The library
> has a tage called site that extends a base tag, and those
> tags use other
> classes in my data namespace to hit a database.
>
> The tags are returning the proper data in both versions, but
> in 4.1.27, I
> have to "reload" the contect in the manager for it to
> "register" the changes
> from the database.  I have added some printlns to std out to
> track what's
> going on.  In tomcat 4.0.6 they are going through all the
> code as I would
> exspect it to.  I have included each of the class files that
> are called.  I
> have also included the printouts from both versions of tomcat
> to clierify
> how each version is handling the calls.
>
> The object hiarchey goes as follows:
>
> jPublish.Tags site extends inc_tag.
> jPublish.Data.site_manager extends jPublish.Data.manager,
> managers contain,
> load, and fill datas.
> jPublish.Data.site_data extends jPublish.Data.data, used for
> storing data
> and tracking updates.
>
>
> --- INDEX.JSP ---
> <%@ page contentType="text/html" %>
> <%@ taglib prefix="inc" uri="inc" %>
> 
> 
>   
>
>   
>   Welcome to !
>   © 
>   
> 
>
> --- TOMCAT 4.0.6 STDOUT ---
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.6
> Starting service Tomcat-Apache
> Apache Tomcat/4.0.6
> jPublish.Data.manager()
> jPublish.Tags.site()
> jPublish.Tags.site.setSite()
> jPublish.Data.

RE: Custom Tag Lib

2003-08-14 Thread Shawn Zernik
Mike:

Thanks so very much...  I saw their is a config option in the Jasper to
turn off tag pooling.  do you thing that would work too, of shouldI
impliment it in my source code.  I'm gonna take a look at it right now.

Shawn

-Original Message-
From: Mike Cherichetti (Renegade Internet)
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:28 PM
To: Tomcat Users List
Subject: RE: Custom Tag Lib


Shawn,

I ran into this problem as well when switching from 4.0 to 4.1.  I think it
has something to do with 4.1 pooling and re-using tag objects.  What I did
in all of my doStartTag(), doAfterBody(), etc... methods was manually call
release() to reset the data in the tags like so:

public int doStartTag() throws JspException
{
  try
  {
...
  }

  catch (Exception exception)
  {
throw new JspException(exception);
  }

  finally
  {
release();
  }

  return SKIP_BODY;
}

Have a nice day ...

Sincerely,

Mike Cherichetti
Renegade Internet
Internet Advertising Delivery Solutions
www.renegadeinternet.com
Phone (724) 658-6346
Fax (724) 658-6346


-Original Message-
From: Shawn Zernik [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:56 PM
To: [EMAIL PROTECTED]
Subject: Custom Tag Lib


Tomcat Users:

I've been fighting with some version differences in tom cat wondering why my
app acts severly different on Tomcat 4.1.27 then 4.0.6.  It appears that
4.1.27 is not working from my perspective, and have been fighting with it
since monday.  None of the books I have touch this subject or ellude to the
problem, and I've seached high and low for solutions.

I'm having a problem working with my custom tag library.  The stange part to
this is it appears to work on tomcat 4.0.6 but not on 4.1.27.  The library
has a tage called site that extends a base tag, and those tags use other
classes in my data namespace to hit a database.

The tags are returning the proper data in both versions, but in 4.1.27, I
have to "reload" the contect in the manager for it to "register" the changes
from the database.  I have added some printlns to std out to track what's
going on.  In tomcat 4.0.6 they are going through all the code as I would
exspect it to.  I have included each of the class files that are called.  I
have also included the printouts from both versions of tomcat to clierify
how each version is handling the calls.

The object hiarchey goes as follows:

jPublish.Tags site extends inc_tag.
jPublish.Data.site_manager extends jPublish.Data.manager, managers contain,
load, and fill datas.
jPublish.Data.site_data extends jPublish.Data.data, used for storing data
and tracking updates.


--- INDEX.JSP ---
<%@ page contentType="text/html" %>
<%@ taglib prefix="inc" uri="inc" %>





Welcome to !
© 



--- TOMCAT 4.0.6 STDOUT ---
Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
Starting service Tomcat-Apache
Apache Tomcat/4.0.6
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Shawn
jPublish.Tags.site.doEndTag(): End

jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()

RE: Custom Tag Lib

2003-08-10 Thread Mike Cherichetti \(Renegade Internet\)
I should have been more clear.  If you have tags without body content, call
release() at the end of doStartTag().  If you have tags with body content,
call release() at the end of doAfterBody().  This has worked rather well for
me.  Perhaps implement TryCatchFinally would be a little cleaner.

Mike

-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 5:08 AM
To: Tomcat Users List
Subject: Re: Custom Tag Lib


Yikes, calling release() in doStartTag() stops any state being
accessible to child (body) tags. That would kill our custom iterator tags.
You could have your tags implement the TryCatchFinally interface,
instead. That way you'll have a chance to reset state before reuse:
http://jakarta.apache.org/taglibs/guidelines.html

I've seen posts on this list saying that tag pooling has either made
their site a dog or has given a huge positive performance gain. For our
site, which has many tags per page, it is the latter case :) If you're
thinking about turning pooling off you'll need to test the effects on
performance.

Jon

PS We had to go through this process on the upgrade. I share your pain

Mike Cherichetti (Renegade Internet) wrote:
> Shawn,
>
> I ran into this problem as well when switching from 4.0 to 4.1.  I think
it
> has something to do with 4.1 pooling and re-using tag objects.  What I did
> in all of my doStartTag(), doAfterBody(), etc... methods was manually call
> release() to reset the data in the tags like so:
>
> public int doStartTag() throws JspException
> {
>   try
>   {
> ...
>   }
>
>   catch (Exception exception)
>   {
> throw new JspException(exception);
>   }
>
>   finally
>   {
> release();
>   }
>
>   return SKIP_BODY;
> }
>
> Have a nice day ...
>
> Sincerely,
>
> Mike Cherichetti
> Renegade Internet
> Internet Advertising Delivery Solutions
> www.renegadeinternet.com
> Phone (724) 658-6346
> Fax (724) 658-6346
>
>
> -Original Message-----
> From: Shawn Zernik [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 07, 2003 10:56 PM
> To: [EMAIL PROTECTED]
> Subject: Custom Tag Lib
>
>
> Tomcat Users:
>
> I've been fighting with some version differences in tom cat wondering why
my
> app acts severly different on Tomcat 4.1.27 then 4.0.6.  It appears that
> 4.1.27 is not working from my perspective, and have been fighting with it
> since monday.  None of the books I have touch this subject or ellude to
the
> problem, and I've seached high and low for solutions.
>
> I'm having a problem working with my custom tag library.  The stange part
to
> this is it appears to work on tomcat 4.0.6 but not on 4.1.27.  The library
> has a tage called site that extends a base tag, and those tags use other
> classes in my data namespace to hit a database.
>
> The tags are returning the proper data in both versions, but in 4.1.27, I
> have to "reload" the contect in the manager for it to "register" the
changes
> from the database.  I have added some printlns to std out to track what's
> going on.  In tomcat 4.0.6 they are going through all the code as I would
> exspect it to.  I have included each of the class files that are called.
I
> have also included the printouts from both versions of tomcat to clierify
> how each version is handling the calls.
>
> The object hiarchey goes as follows:
>
> jPublish.Tags site extends inc_tag.
> jPublish.Data.site_manager extends jPublish.Data.manager, managers
contain,
> load, and fill datas.
> jPublish.Data.site_data extends jPublish.Data.data, used for storing data
> and tracking updates.
>
>
> --- INDEX.JSP ---
> <%@ page contentType="text/html" %>
> <%@ taglib prefix="inc" uri="inc" %>
> 
> 
>   
>
>   
>   Welcome to !
>   © 
>   
> 
>
> --- TOMCAT 4.0.6 STDOUT ---
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.6
> Starting service Tomcat-Apache
> Apache Tomcat/4.0.6
> jPublish.Data.manager()
> jPublish.Tags.site()
> jPublish.Tags.site.setSite()
> jPublish.Data.manager()
> jPublish.Tags.site.doEndTag(): Begin
> jPublish.Tags.site.doEndTag(): End
> jPublish.Data.manager()
> jPublish.Tags.site()
> jPublish.Tags.site.doEndTag(): Begin
> jPublish.Tags.inc_tag.loaded()
> jPublish.Tags.inc_tag.loaded(): not instance
> jPublish.Data.manager.load()
> jPublish.Tags.inc_tag.loaded(): load ok
> jPublish.Tags.inc_tag.loaded(): next ok
> jPublish.Tags.inc_tag.loaded(): reached fill.
> jPublish.Tags.site.loaded()
> Internetwork Consulting
> jPublish.Tags.site.doEndTag(): End
> jPublish.Data.manager()
>

RE: Custom Tag Lib

2003-08-08 Thread Angus Mezick
It would be best if you went a rewrote your tags not to require release
to be called.  That change will also bring you in-line with the jsp
spec.  These links might help:
http://www.onjava.com/lpt/a/1248
http://www.onjava.com/lpt/a/1250
http://jakarta.apache.org/taglibs/guidelines.html

> -Original Message-
> From: Shawn Zernik [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, August 07, 2003 11:41 PM
> To: Tomcat Users List; [EMAIL PROTECTED]
> Subject: RE: Custom Tag Lib
> 
> 
> Mike:
> 
> Thanks so very much...  I saw their is a config option in 
> the Jasper to
> turn off tag pooling.  do you thing that would work too, of shouldI
> impliment it in my source code.  I'm gonna take a look at it 
> right now.
> 
> Shawn
> 
> -Original Message-
> From: Mike Cherichetti (Renegade Internet)
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 07, 2003 10:28 PM
> To: Tomcat Users List
> Subject: RE: Custom Tag Lib
> 
> 
> Shawn,
> 
> I ran into this problem as well when switching from 4.0 to 
> 4.1.  I think it
> has something to do with 4.1 pooling and re-using tag 
> objects.  What I did
> in all of my doStartTag(), doAfterBody(), etc... methods was 
> manually call
> release() to reset the data in the tags like so:
> 
> public int doStartTag() throws JspException
> {
>   try
>   {
> ...
>   }
> 
>   catch (Exception exception)
>   {
> throw new JspException(exception);
>   }
> 
>   finally
>   {
> release();
>   }
> 
>   return SKIP_BODY;
> }
> 
> Have a nice day ...
> 
> Sincerely,
> 
> Mike Cherichetti
> Renegade Internet
> Internet Advertising Delivery Solutions
> www.renegadeinternet.com
> Phone (724) 658-6346
> Fax (724) 658-6346
> 
> 
> -Original Message-
> From: Shawn Zernik [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 07, 2003 10:56 PM
> To: [EMAIL PROTECTED]
> Subject: Custom Tag Lib
> 
> 
> Tomcat Users:
> 
> I've been fighting with some version differences in tom cat 
> wondering why my
> app acts severly different on Tomcat 4.1.27 then 4.0.6.  It 
> appears that
> 4.1.27 is not working from my perspective, and have been 
> fighting with it
> since monday.  None of the books I have touch this subject or 
> ellude to the
> problem, and I've seached high and low for solutions.
> 
> I'm having a problem working with my custom tag library.  The 
> stange part to
> this is it appears to work on tomcat 4.0.6 but not on 4.1.27. 
>  The library
> has a tage called site that extends a base tag, and those 
> tags use other
> classes in my data namespace to hit a database.
> 
> The tags are returning the proper data in both versions, but 
> in 4.1.27, I
> have to "reload" the contect in the manager for it to 
> "register" the changes
> from the database.  I have added some printlns to std out to 
> track what's
> going on.  In tomcat 4.0.6 they are going through all the 
> code as I would
> exspect it to.  I have included each of the class files that 
> are called.  I
> have also included the printouts from both versions of tomcat 
> to clierify
> how each version is handling the calls.
> 
> The object hiarchey goes as follows:
> 
> jPublish.Tags site extends inc_tag.
> jPublish.Data.site_manager extends jPublish.Data.manager, 
> managers contain,
> load, and fill datas.
> jPublish.Data.site_data extends jPublish.Data.data, used for 
> storing data
> and tracking updates.
> 
> 
> --- INDEX.JSP ---
> <%@ page contentType="text/html" %>
> <%@ taglib prefix="inc" uri="inc" %>
> 
> 
>   
> 
>   
>   Welcome to !
>   © 
>   
> 
> 
> --- TOMCAT 4.0.6 STDOUT ---
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.6
> Starting service Tomcat-Apache
> Apache Tomcat/4.0.6
> jPublish.Data.manager()
> jPublish.Tags.site()
> jPublish.Tags.site.setSite()
> jPublish.Data.manager()
> jPublish.Tags.site.doEndTag(): Begin
> jPublish.Tags.site.doEndTag(): End
> jPublish.Data.manager()
> jPublish.Tags.site()
> jPublish.Tags.site.doEndTag(): Begin
> jPublish.Tags.inc_tag.loaded()
> jPublish.Tags.inc_tag.loaded(): not instance
> jPublish.Data.manager.load()
> jPublish.Tags.inc_tag.loaded(): load ok
> jPublish.Tags.inc_tag.loaded(): next ok
> jPublish.Tags.inc_tag.loaded(): reached fill.
> jPublish.Tags.site.loaded()
> Internetwork Consulting
> jPublish.Tags.site.doEndTag(): End
> jPublish.Data.manager()
> jPublish.Tags.site()
> jPublish.Tags.site.doEndTag(): Begin
> jPublish.T

Re: Custom Tag Lib

2003-08-08 Thread Tim Funk
SimpleTag is part of JSP2.0 which is in tomcat5. AFAIK, there is no simpletag 
for jsp1.2 (tomcat4)

More info on tag pooling:
http://jakarta.apache.org/tomcat/faq/misc.html#tagpool
http://jakarta.apache.org/tomcat/faq/misc.html#tagbroken
-Tim

Shawn Zernik wrote:
Mike:

I can't resolve that problem.  can I impliment those tags as simple tags:
the JSP spec says that they will not be cached or reused.
Shawn
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]