struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gemes Tibor <>
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?



To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message