struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gemes Tibor <ge...@regens.hu>
Subject img store/retrieve
Date Thu, 05 Dec 2002 12:37:45 GMT
I think this is a bit OT on this list.

I have to store uploaded images into the RDBMS, and then later retrieve them 
on request.

This is a simple CRUD page, but the entity has an image property. I  retrieve 
the View Object from the RDBMS and populate the ActionForm from it. 

I think that the image should not be stored in the VO. Am I right?

Where should I store the image if I have to display it on the page? I cannot 
store in request, as the browser creates a new request for each img on the 
page afaik. I'm not keen on storing it in the session since I prefer to store 
small amount of data in session scope.

Do I have to create a servlet which sets the content-type depending the img 
type, and writes the bytestream back to the user agent? If so how am I 
supposed to call this servlet from <html:img> ?

What is the best practice implementing this? Or the suggested one? Or at least 
the least painful one?

TIA,

Tib



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message