Hi,

I have one classic HttpServlet for dynamically rendering an image from given (database retrieved) data. Actually this servlet takes data from session (previously retrieved from database and put inside session) and renders the image. Since this is not Action but classis servlet it is mapped in web.xml as '/ImageServlet'. When I have in my html/jsp tag like this one '<img src="/ImageServlet">', I get wanted image. That's all fine.

Now, I'd like to avoid using session for this purpose and like to take data for ImageServlet from request but I see that request data is not forwarded in additional browser's request for image. When I originally request page like 'page.jsp?id=1' this 'id=1' is not forwarded in request for image data '<img src="/ImageServlet">' from page.jsp! That's why I use session. Is this only possibility? Can I use '<html:img src=.../>' or '<html:img action=...>' and expect original page request to be forwarded to image request as well?

On the other hand, how to create Struts' Action that could be used for the same purpose of rendering image? In classic HttpServlet there are methods doPost/doGet which do not return any data (void) but Struts' Action expects ActionForward as a return value. What might be the return value in case that this Action is used for rendering image and called inside '<img src="/ImageAction">' or '<html:img action="/ImageAction"/>'?

SB



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

Reply via email to