[EMAIL PROTECTED] wrote:
Hi folks,
I am new to the user list. I have been developing with Struts for about 2
years. I have an open source ajax project that I am building an integration
piece now so that you can use it with Struts. I believe that my syntax for a
dynamic form property is correct (shown below). My question is this. XmlHttp
allows you to open an instance of a server. That server allows you to post
data by setting a request header of "Content-Type",
"application/x-www-form-urlencoded" using setRequestHeader. When the
parameters get sent to the server they show up as request.getAttribute...
instead of getParameter. how can I populate a dynamic form with posted data. I
I'm not sure how you came to that conclusion... Request parameters
should show up as... request parameters. request.getAttribute doesn't
have anything to do with the request parameters.
am attaching the name/value pairs to the query string when I open the
connection to the server like so.
server = xmlhttpInstance;
server.open("post",name=value&etc=etc,false);
and then sending the data to the server like so.
server.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
server.send(xmlString);
Might I be using xmlhttp incorrectly?
Possibly, though I don't see an obvious problem. Start by using a
browser to simply send GET requests until you're sure you have the
Struts-app side of things working. The try doing gets with
XmlHttpRequest. Once that's working, you can switch to POSTs and get
that going.
L.
<form-bean name="ajaxForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="xmlString" type="java.lang.String"></form-property>
</form-bean>
Bryan LaPlante
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]