jsp ,need sample code

hi allim 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.plz send codes immediately.mail me at ayirp_india@yahoo.co.inthank you khusiyan
[292 byte] By [khusiyana] at [2007-11-26 14:24:58]
# 1

> 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?

CeciNEstPasUnProgrammeura at 2007-7-8 2:17:47 > top of Java-index,Java Essentials,New To Java...
# 2

> 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?

%

duffymoa at 2007-7-8 2:17:47 > top of Java-index,Java Essentials,New To Java...
# 3

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.

ted_trippina at 2007-7-8 2:17:47 > top of Java-index,Java Essentials,New To Java...
# 4
here's the sql for insertionInsert image into OracleTable where image = picture;for retrieving into html:retrieve image from OracleTable where image=picture;print it to htmlput image into html where htmlTable=table
angeles1016a at 2007-7-8 2:17:47 > top of Java-index,Java Essentials,New To Java...
# 5
SELECT Elephant FROM Africa...
CeciNEstPasUnProgrammeura at 2007-7-8 2:17:47 > top of Java-index,Java Essentials,New To Java...
# 6

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.

Komsiia at 2007-7-8 2:17:47 > top of Java-index,Java Essentials,New To Java...
# 7

> 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).

karma-9a at 2007-7-8 2:17:47 > top of Java-index,Java Essentials,New To Java...