You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Leonard Sitongia <si...@ucar.edu> on 2004/06/25 17:02:55 UTC

formatDate sometimes doesn't render right

Hi,

The format taglib formatDate tag sometimes doesn't return the formatted 
date.

My JSP has a fragment that looks like this:

<cache:cache key="NewsPressReleases" cron="0 * * * *">
	<fmt:formatDate value="${release}" pattern="MMM dd, yyyy"/>
</cache:cache>

(The cache tag library is from OpenSymphony.)

Most of the time, the page will show a date like Jun 11, 2004.  
Sometimes it will show the raw date format, like "2004-06-23 
08:00:00.0".  Sometimes it returns the date with the month in lower 
case, like "jun" instead of "Jun".

There are no error messages reported.

The cache tag is probably merely be capturing what some other problem 
is rendering, that the execution of the JSTL fmt command periodically 
fails and returns the raw date.  But, I thought I'd include that 
context.

Has anyone seen this before?  I don't see reports of this in the 
archive for this list.  Anyone have suggestions for how I should 
proceed?

Environment:
Sun Solaris 9
SunCluster
Tomcat 5 with clustering
Jakarta JSTL standard 1.1
OpenSymphony tag lib

Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: formatDate sometimes doesn't render right

Posted by Kris Schneider <kr...@dotech.com>.
Next thing I'd try is eliminating Standard completely:

<%@ page import="java.text.SimpleDateFormat" %>

<cache:cache key="NewsPressReleases" cron="0 * * * *">
<%= new SimpleDateFormat("MMM dd,
yyyy").format(pageContext.findAttribute("release")) %>
</cache:cache>

Quoting Leonard Sitongia <si...@ucar.edu>:

> 
> On Jun 25, 2004, at 9:16 AM, Kris Schneider wrote:
> 
> > Have you tried testing without the <cache:cache> tag?
> 
> Thank you for your quick response, Kris.
> 
> Yes I've tried without the cache tags, but the problem is intermittent. 
>   I can do many page reloads and not see it.  It comes up a few times a 
> week.  I've posted to the OpenSymphony list, and there was no answer.
> 
> >
> > Quoting Leonard Sitongia <si...@ucar.edu>:
> >
> >> Hi,
> >>
> >> The format taglib formatDate tag sometimes doesn't return the 
> >> formatted
> >> date.
> >>
> >> My JSP has a fragment that looks like this:
> >>
> >> <cache:cache key="NewsPressReleases" cron="0 * * * *">
> >> 	<fmt:formatDate value="${release}" pattern="MMM dd, yyyy"/>
> >> </cache:cache>
> >>
> >> (The cache tag library is from OpenSymphony.)
> >>
> >> Most of the time, the page will show a date like Jun 11, 2004.
> >> Sometimes it will show the raw date format, like "2004-06-23
> >> 08:00:00.0".  Sometimes it returns the date with the month in lower
> >> case, like "jun" instead of "Jun".
> >>
> >> There are no error messages reported.
> >>
> >> The cache tag is probably merely be capturing what some other problem
> >> is rendering, that the execution of the JSTL fmt command periodically
> >> fails and returns the raw date.  But, I thought I'd include that
> >> context.
> >>
> >> Has anyone seen this before?  I don't see reports of this in the
> >> archive for this list.  Anyone have suggestions for how I should
> >> proceed?
> >>
> >> Environment:
> >> Sun Solaris 9
> >> SunCluster
> >> Tomcat 5 with clustering
> >> Jakarta JSTL standard 1.1
> >> OpenSymphony tag lib
> >>
> >> Thanks!
> >
> > -- 
> > Kris Schneider <ma...@dotech.com>
> > D.O.Tech       <http://www.dotech.com/>

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: formatDate sometimes doesn't render right

Posted by Leonard Sitongia <si...@ucar.edu>.
On Jun 25, 2004, at 11:29 AM, Leonard Sitongia wrote:

>
> On Jun 25, 2004, at 9:16 AM, Kris Schneider wrote:
>
>> Have you tried testing without the <cache:cache> tag?
>
> Thank you for your quick response, Kris.
>
> Yes I've tried without the cache tags, but the problem is 
> intermittent.  I can do many page reloads and not see it.  It comes up 
> a few times a week.  I've posted to the OpenSymphony list, and there 
> was no answer.

I'm trying to troubleshoot further.  Instead of sitting at my browser 
and clicking reload, I decided to try using JMeter to look for the 
error (which is when the fmt tag doesn't format the Date right).

When I look at the responses from JMeter, the date format is always 
wrong.

This is very strange.  JMeter is simply talking to my server.  The 
rendering of the JSP using the fmt tag to format the date is running on 
the server.  Why would JMeter always show me the raw Date format 
instead of the fmt:formatDate format?


>
>>
>> Quoting Leonard Sitongia <si...@ucar.edu>:
>>
>>> Hi,
>>>
>>> The format taglib formatDate tag sometimes doesn't return the 
>>> formatted
>>> date.
>>>
>>> My JSP has a fragment that looks like this:
>>>
>>> <cache:cache key="NewsPressReleases" cron="0 * * * *">
>>> 	<fmt:formatDate value="${release}" pattern="MMM dd, yyyy"/>
>>> </cache:cache>
>>>
>>> (The cache tag library is from OpenSymphony.)
>>>
>>> Most of the time, the page will show a date like Jun 11, 2004.
>>> Sometimes it will show the raw date format, like "2004-06-23
>>> 08:00:00.0".  Sometimes it returns the date with the month in lower
>>> case, like "jun" instead of "Jun".
>>>
>>> There are no error messages reported.
>>>
>>> The cache tag is probably merely be capturing what some other problem
>>> is rendering, that the execution of the JSTL fmt command periodically
>>> fails and returns the raw date.  But, I thought I'd include that
>>> context.
>>>
>>> Has anyone seen this before?  I don't see reports of this in the
>>> archive for this list.  Anyone have suggestions for how I should
>>> proceed?
>>>
>>> Environment:
>>> Sun Solaris 9
>>> SunCluster
>>> Tomcat 5 with clustering
>>> Jakarta JSTL standard 1.1
>>> OpenSymphony tag lib
>>>
>>> Thanks!
>>
>> -- 
>> Kris Schneider <ma...@dotech.com>
>> D.O.Tech       <http://www.dotech.com/>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: formatDate sometimes doesn't render right

Posted by Leonard Sitongia <si...@ucar.edu>.
On Jun 25, 2004, at 9:16 AM, Kris Schneider wrote:

> Have you tried testing without the <cache:cache> tag?

Thank you for your quick response, Kris.

Yes I've tried without the cache tags, but the problem is intermittent. 
  I can do many page reloads and not see it.  It comes up a few times a 
week.  I've posted to the OpenSymphony list, and there was no answer.

>
> Quoting Leonard Sitongia <si...@ucar.edu>:
>
>> Hi,
>>
>> The format taglib formatDate tag sometimes doesn't return the 
>> formatted
>> date.
>>
>> My JSP has a fragment that looks like this:
>>
>> <cache:cache key="NewsPressReleases" cron="0 * * * *">
>> 	<fmt:formatDate value="${release}" pattern="MMM dd, yyyy"/>
>> </cache:cache>
>>
>> (The cache tag library is from OpenSymphony.)
>>
>> Most of the time, the page will show a date like Jun 11, 2004.
>> Sometimes it will show the raw date format, like "2004-06-23
>> 08:00:00.0".  Sometimes it returns the date with the month in lower
>> case, like "jun" instead of "Jun".
>>
>> There are no error messages reported.
>>
>> The cache tag is probably merely be capturing what some other problem
>> is rendering, that the execution of the JSTL fmt command periodically
>> fails and returns the raw date.  But, I thought I'd include that
>> context.
>>
>> Has anyone seen this before?  I don't see reports of this in the
>> archive for this list.  Anyone have suggestions for how I should
>> proceed?
>>
>> Environment:
>> Sun Solaris 9
>> SunCluster
>> Tomcat 5 with clustering
>> Jakarta JSTL standard 1.1
>> OpenSymphony tag lib
>>
>> Thanks!
>
> -- 
> Kris Schneider <ma...@dotech.com>
> D.O.Tech       <http://www.dotech.com/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: formatDate sometimes doesn't render right

Posted by Kris Schneider <kr...@dotech.com>.
Have you tried testing without the <cache:cache> tag?

Quoting Leonard Sitongia <si...@ucar.edu>:

> Hi,
> 
> The format taglib formatDate tag sometimes doesn't return the formatted 
> date.
> 
> My JSP has a fragment that looks like this:
> 
> <cache:cache key="NewsPressReleases" cron="0 * * * *">
> 	<fmt:formatDate value="${release}" pattern="MMM dd, yyyy"/>
> </cache:cache>
> 
> (The cache tag library is from OpenSymphony.)
> 
> Most of the time, the page will show a date like Jun 11, 2004.  
> Sometimes it will show the raw date format, like "2004-06-23 
> 08:00:00.0".  Sometimes it returns the date with the month in lower 
> case, like "jun" instead of "Jun".
> 
> There are no error messages reported.
> 
> The cache tag is probably merely be capturing what some other problem 
> is rendering, that the execution of the JSTL fmt command periodically 
> fails and returns the raw date.  But, I thought I'd include that 
> context.
> 
> Has anyone seen this before?  I don't see reports of this in the 
> archive for this list.  Anyone have suggestions for how I should 
> proceed?
> 
> Environment:
> Sun Solaris 9
> SunCluster
> Tomcat 5 with clustering
> Jakarta JSTL standard 1.1
> OpenSymphony tag lib
> 
> Thanks!

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org