• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

byte array to string

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys,

Here is my problem:

I have stored many datas in a database using MySQL,some of them stored as Blob.Say,a long name of food is stored as Blob.

Now,I have to do a query and display these data,which is readable too.

Is there any jstl action or other tags to transform Blob data which can be retrieved as byte array or binarystream to origial string value in jsp?

Thanks!

[BPSouther: changed title before moving to IO Streams forum]
[ August 06, 2006: Message edited by: Ben Souther ]
 
Sheriff
Posts: 67590
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A Blob is a database concept and shouldn't come anywhere near a JSP page. The conversion of data types like clobs, blobs and SQL dates to "everyday" counterparts should be handled in the model code and never come near the presentation code.
 
Joshua Cloch
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes,but,sometimes it is needed.all right,maybe the only way is to design a custom tag
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I were working on this, I would first focus on converting a binary stream or byte array into a string. Once I got that working in a small, standalone Java app, I would figure out how best to use that code in my webapp; servlet, helper bean, custom tag, etc.

Since the first task at hand is not JSP specific, I'm going to move this thread to the IO/Streams forum.
 
Hot dog! An advertiser loves us THIS much:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic