Hi,
Thanks! It sound like a problem in JSTL-SQL. I believe other databases
behave in the same way as H2. The toString() method is not supposed to read
the whole string, because that might cause I/O (toString methods should not
cause side effects and should be very fast, because they are called by the
IDE when debugging).
Regards,
Thomas
On Tuesday, November 22, 2011, Alexander Hartner wrote:
> Hi Thomas,
>
> Thanks for getting back to me. I am using JSTL - SQL tab library
>
> <sql:query var="details" dataSource="jdbc/AddressBookDB">
> SELECT Events.description, Events.summary,....
> </sql:query>
> <c:forEach var="detail" items="${details.rows}" varStatus="status">
> <tr>
> <td>
> <c:out value="${detail.description}"/>
> </td>
> <td>
> <c:out value="${detail.summary}"/>
> </td>
> ...
>
> Since the description and summary columns are defined as Clobs I am
> getting those back and JSTL seems to be calling toString on the Clob
> object. I added some additional code to handle this situation better and
> invoke getSubString on the Clob object. There are definitely better
> solutions for this than what I have implemented with using custom tag
> libraries or an object model rather then JSTL / Clobs directly.
>
> Thanks for your help with this.
>
> Regards
> Alex
>
>
> On 21/11/2011, at 15:54 , Thomas Mueller wrote:
>
> Hi,
>
> However when I read the string value from my own application I get back
>>
>> *STRINGDECODE('TEXT\nMORE TEXT....') *
>>
>
> How do you read it exactly? To you use Clob.toString()? That's not the
> right API. Use ResultSet.getString(..) or Clob.getSubString instead.
>
> Also is there an option on the H2 console to not make it decode the text
>> and show me the actual content including any special character ?
>>
>
> Browsers would re-format it (actually it would be a security problem).
>
> Regards,
> Thomas
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.