tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TroyGeek <troyg...@gmail.com>
Subject Re: Problem with SQL Dates since MySQL Upgrade
Date Tue, 21 Jun 2005 13:21:28 GMT
But shouldn't JSTL be doing all of that for me? I'm not dealing with
any java scriplet...just JSTL tags. I'm using <sql:query>,
<c:forEach>, <c:out> to print out the data. Maybe the combination of
the new database version and old driver returned a byte array where it
should have been returning a string? Either way, after upgrading the
driver all is well, so I suspect the problem was related with the
driver.

thank you for your response!

~ T r o y ~



On 6/21/05, Dima Gutzeit <dima@mailvision.net> wrote:
> That problem was that you were getting byte array instead of String, you
> could bypass it by creating new String object from this byte array.
> 
> 
> ----- Original Message -----
> From: "TroyGeek" <troygeek@gmail.com>
> To: <taglibs-user@jakarta.apache.org>
> Sent: Tuesday, June 21, 2005 1:42 PM
> Subject: Re: Problem with SQL Dates since MySQL Upgrade
> 
> 
> I figured out the problem on my own. I upgraded my JDBC driver for
> MySQL from 3.1.6 to 3.1.8 and now everything works fine.
> 
> thank you.
> 
> On 6/18/05, TroyGeek <troygeek@gmail.com> wrote:
> > Hello,
> > I'm using Tomcat 5.0.28. I think I might be using JSTL 1.0. I'm using
> > Java 1.4.2_05.
> > I develop a small webapp on Windows. When I'm done coding the web
> > pages, I upload to a Linux server. The linux server recently had its
> > MySQL database upgraded from MySQL 3 to MySQL 4.1.
> >
> > Since that change, my date formatting using MySQL's DATE_FORMAT has
> > been screwy. On Windows, everything works fine (My Windows system uses
> > same programs and versions as Linux system). But, when I use
> > DATE_FORMAT to format my date as a string and print that date string
> > out using <c:out> it comes out looking like this:
> >
> > [B@4d6b1a
> >
> > ...instead of:
> >
> > Thursday, January 27th, 2005
> >
> > Also, if I refresh the JSP, that weird string with the 'at' sign
> > changes everytime. If I select the dates directly from the database
> > everything looks fine:
> >
> > +---------+-----------------------------------------+
> > | blog_id | DATE_FORMAT(blog_date,'%W, %M  %D, %Y') |
> > +---------+-----------------------------------------+
> > |       4 | Thursday, October  14th, 2004           |
> > |       5 | Sunday, October  17th, 2004             |
> > |       3 | Thursday, October  14th, 2004           |
> > |       6 | Thursday, January  27th, 2005           |
> > +---------+-----------------------------------------+
> >
> > But just when the JSTL prints out that string it comes out weird. You
> > can see an example of what i'm talking about here:
> >
> > http://www.troygeek.com/Blogs.jsp
> >
> > I've tried recreating the table, setting the dates to null and then
> > back again, etc. I'm not sure what else to do.
> >
> > Any thoughts are much appreciated.
> >
> > Thank you, Troy Campano
> >
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message