Hello all. I am facing a problem which has made pull my hair off for quite a while now. I've looked everything my friend google gave me, but nothing relevant showed up. As a last hope, I am turning myself to you.
I have a simple JSP code : <s:form action="addFileToGallery" method="post" enctype= "multipart/form-data"> <s:file name="uploadAFile" id="uploadAFile" accept="*" /> <s:submit theme="ajax" targets="gallery_images" notifyTopics="/addFile" /> </s:form> <s:url action="viewFileOfGallery" id="viewFileOfGallery"/> <s:div id="gallery_images" theme="ajax" href="%{viewFileOfGallery}" loadingText="Loading ..." listenTopics="/refreshGalleryImages" /> My viewFileOfGallery action sets few lists and then a blank JSP is loaded. When I submit the above form, the file is correctly uploaded, I do my thing with it, create a line in my database and return SUCCESS. The addFile topic empties the uploadAFile input field. What happens is startling me. Instead of getting my blank JSP displayed in my div as the answer of the AJAX request, I get a pretty "[object HTMLDocument]" displayed and nothing more. My topic has been dispatched since my input field is empty.Now, to go futher into the 4th dimension, if I just refresh my div, it works. I mean by that, that all my data management on the server has been correctly done. In my addFile topic, I added a /refreshGalleryImages dispatch, and after displaying this weird message, it reloads and displays my files. This only on Firefox, on IE it just doesn't work, it stops on the weird message. I can't figure out what this message means, or even where does it come from. I have no way to know which request returns this to me ... I'm lost. Is anyone able to help me ? Don't hesitate to ask me for some more information (struts.xml, java code and so on if you think it's relevant ...) Thanks in advance.