I reposted it at the same address.
Of perhaps more interest though... I am working on an article covering this in more details with a few more examples. I'm hoping to finish it today, tomorrow at the latest.
Back to Struts ;-)
I did a little something so I could test AJAX development with Struts.
Basically here is what I do :
For the javascript :
I get an XMLHttpRequest/ActiveXObject("Microsoft.XMLHTTP") object, on an onclick event.
I retrieve the values stored in result.responseText (I don't need XML for the kind of processing I need). I contains something like :
label1;value1:label2;value2:label3;value3:... (1)
which I split() and process accordingly.
On the Struts side :
I have an action which does "nothing", except set an attribute for the request with (1) as the output :
----- MyAction -----
public ActionForward execute(...) { // retrieve values in the Database ... MyBean result = new MyBean(...); request.setAttribute("result", result.toString()); return mapping.findForward(Constants.OK); }
... and forwards to a JSP which contains the following line :
---- JSP ---- <%@ taglib uri="..." prefix="bean" %> <bean:write name="result"/>
This is working fine AFAIK, but while in IE it displays the result and that is all, in Firefox the page is still in a loading process... even though it has displayed all there was to be displayed !
I don't think this is a problem with Struts, rather with Firefox and its way of handling XMLHttpRequest... But is there a way to bypass this behaviour ?
-- Stéphane Zuckerman
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]