Hi,
i've got a StreamResult from a Struts action ( using struts 2.0.9), that
returns an image/jpeg.
Works fine without using ajax(shows the image into the broser, but in a
new window),
but returns only plain text with using ajax.
My Code:
xml:
<action name="showPhoto" class="actions.GetPhotoAction">
<result name="success" type="stream">
<param name="contentType">image/jpg</param>
<param name="inputName">imageStream</param>
<param name="contentDisposition">filename="image.jpg"</param>
<param name="bufferSize">1024</param>
</result>
</action>
jsp:
without ajax:
<s:form action="showPhoto.action">
...
<s:submit value="show Image"/>
</s:form>
and with ajax:
<s:form action="showPhoto.action">
...
<s:submit theme="ajax" targets="image" executeScripts="true"
showLoadingText="false" value="show Image"/>
</s:form>
<img id="image">
Thanks a lot for any help,
Jan Steinke
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]