> im new to java technology, can any one help me
> to insert images into oracle database and retrive it
> into a html table.plz someone assist me with sample
> codes in jsp.
*ROFL*
> plz send codes immediately.
> mail me at ayirp_india@yahoo.co.in
Would you like fries with that?
> hi all
> im new to java technology, can any one help me
> to insert images into oracle database and retrive it
> into a html table.plz someone assist me with sample
> codes in jsp.
> lz send codes immediately.
> mail me at ayirp_india@yahoo.co.in
> thank you
> khusiyan
First day on that new consulting gig? First assignment?
%
Immediately ey? Hmm, let me ponder that....
Insertion: follow tutorial on BLOB's.
Retrieval: put what into a table? The image? the name of the image?. You don't stick an image in a table, you stick the URL in. You would either deploy the image to your images folder (for example) or use one of Oracles tricks for displaying it.
Ted.
Because a JSP page is a servlet, it's just pure Java code you'll have to write. Maybe you need two servlets:
Servlet 1: Prints a page with link <img src="http://server.com/servlet2/showImage?id=123">
and
Servlet 2: Parses the id, gets the data from db and puts it to the output
Result: there will be an image on the screen when servlet 1 is called.
> Because a JSP page is a servlet, it's just pure Java
> code you'll have to write. Maybe you need two
> servlets:
No, you don't.
>
> Servlet 2: Parses the id, gets the data from db and
> puts it to the output
This is poor advice.
Servlets are meant to be thin front-end controllers, not responsible for db operations.
Those are typically performed in a plain java class called a Data Access Object (DAO).