Show images???

Hi,

i have stored images in a doctype Non-XML and now i want to show them in java but i dont
understand how???

i have this http://localhost/tamino/Cinetheque/cinetheque/image(non-xml)

can anyone explain me the all stages ( connection, accessor, xquery???) to make this ???



thanks a lot !!!

Hello Poussin,

In your-Tamino-Installation-directory, in the directory SDK\TaminoAPI4J\Documentation\inoapi\listings\hello
there is an example java program that demonstrates this.
The program will:
- establish a connection to the Tamino database
- obtain a non-XML accessor
- start a local transaction mode and
o retrieve first object stored
o update object just inserted
o on success commit transaction otherwise roll back
- switch back to auto-commit mode
- query updated document
- delete document
- close the connection

The program name is ProcessNonXMLGreeting.java

Rob

thanks a lot …

but how can i display pictures in a java program???

hi poussing,

try the java class java.lang.Graphics and the methode drawImage() and follow your way through the rest of the API documentation.

hope this helps [or did you want to build a swing application].

gruss,
andreas f.

Hi

i want to display a picture in a a web page with jsp !!

but now i have the image in a outputStream but when i display it it’s not a image but text like this
?!!1AQaq? ?

hi poussing,

taking the aspect of JSP aside, do I assume correctly that the result(!) of the jsp operation will be a served html page that somewhere along the line contains an <image …/> tag in which the desired image should be shown.

if this is your scenario and you want to access the image as part of an ongoing database connection that is controlled by the API, i simply don’t see how it should be done, other than within the code of the jsp unloading/reading the picture from tamino, writing it to some kind of images directory of the webserver and referencing it completely outside the scope of tamino.

if the above is your scenario, but you dont care about transactionality of access to the image, then you can probably - in the image tag - simply put the url as you are stating it yourself into the image tag and you should be done.

hope this helps.

gruss,
andreas f.