cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "leona s" <...@realtime.net>
Subject POSTing form data to a servlet
Date Sat, 22 Feb 2003 04:37:06 GMT
Hi All,

I hope someone here can help me with a Cocoon problem.

I have an application that uses Xindice for its data store. I also
have a servlet that can get data from Xindice, such as:

 <map:generate
src="http://localhost:8080/kong/servlet/MyServlet?MyAction=GetXMLResource&am
p;MyCollection=mycoll&amp;MyResource=mystuff"/>

This work just fine for getting whatever is in "mystuff".  Now I want to do
updates
to Xindice using information posted from an HTML form.

For example, I have:

<form method="POST" action="add_detail>
  <input type="text" name="someinput"/>
  <input type="submit" name="submit" value="submit"/>
  <input type="hidden" name="MyAction" value="XUpdate"/>
  <!-- other values sent to the sitemap -->
</form>

I have a pipeline in my sitemap that maps to this form, but I don't know how
I can get the information from the form POST to the servlet. I have tried
things like:
    <map:match pattern="add_detail">
      <map:act type="request">
        <map:parameter name="parameters" value="true"/>
        <map:generate src=http://localhost:8080/kong/servlet/MyServlet/>
        <map:serialize/>
      </map:act>
    </map:match>

but it doesn't pass the parameters to the servlet. I don't want to append
the
individual parameters to the end of the servlet call (i.e. GET). In other
words,
is there an action or generator that acts like a POST to whatever servlet
you
give it, and uses the current sitemap parameters (those that have been sent
by
the form)? This seems to be a common enough problem that such a component
would already exist, but I have done extensive searches and haven't found
one.

I am using WXPPro/C 2.0.4/Tomcat 4.1.18/JDK 1.4.

Thanks very much.
Leona Slepetis




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message