> Hello everybody : is it possible with struts tag libraries to
> retrive dynamically for example pictures from a database and place
them
> on the jsp page on the fly....

Write an action that will have something like 

response.setContentType ("image/jpg");
OutputStream os = response.getOutputStream ();
while (have bytes of picture available) {
        os.write (write the byte);
}
response.flush ();
repsonse.close ();
return null;

You just need to serve your JSP page as usual, linking your images to
the action above. Since for each image link browser isssues a separate
request, you should be fine with not mixing up your content types.

> And also another question : I would like a user to be able to select
> from a page certain file names ( dynamicaly generated ) and
> then to press a download button -> I want to fetch the requested files
> from a database, pack them in one unique zip file and push this to the
> user.
> Has any of you done something similar... And if not do you think it is
> feasable????

Same as with pictures practically no difference, except you will need to
change the content type to "application/zip", I think. We do it at my
workplace for packing the reports and it works pretty well.

Alex.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to