Arun,

Are you doing a POST with multi-part encoding?  If so, a solution similar 
to file upload would work for you. If not, then the String in action-form 
approach that I posted earlier should work. 

- Rahul Mohan



From:
Arun Kumar Boppudi <arunkumar.bopp...@gmail.com>
To:
Struts Users Mailing List <user@struts.apache.org>
Date:
29-07-2010 13:34
Subject:
Re: Reading input stream (xml)



Rahul,

I am not sending XML content as part of the query string, only XML content
will be sent in the request body. As struts framework uses the 
getParameter
to populate data into the form beans before calling the execute method, we
cannot use the request.getInputStream.

http://archives.java.sun.com/cgi-bin/wa?A2=ind0106&L=jsp-interest&F=&S=&P=49196


-- AB


On Thu, Jul 29, 2010 at 11:01 AM, Rahul Mohan <rahul.mo...@tcs.com> wrote:

> Arun,
>
> You can keep a string property on action form and map it to the xml 
field
> so that the xml content is available here on page submit. In the action
> class, then you will be able to get the string and parse it using any
> available xml parser. I don't think Struts provides any shortcut for 
this
> requirement.
>
> - Rahul Mohan
>
>
>
> From:
> Arun Kumar Boppudi <arunkumar.bopp...@gmail.com>
> To:
> Struts Users Mailing List <user@struts.apache.org>
> Date:
> 29-07-2010 10:32
> Subject:
> Re: Reading input stream (xml)
>
>
>
> Actually, I am not uploading a file. I am creating XML from the data
> entered
> into the form and sending it to the action controller in the POST 
request
> body. In the action controller, I would like to parse the XML. How to do
> it
> in Struts 1.3?
>
> -- Arun Kumar Boppudi
>
>
> On Thu, Jul 29, 2010 at 10:24 AM, Rahul Mohan <rahul.mo...@tcs.com> 
wrote:
>
> > Doesn't this link (
http://struts.apache.org/2.0.14/docs/file-upload.html
> )
> > help you?
> >
> >
> >
> > From:
> > Arun Kumar Boppudi <arunkumar.bopp...@gmail.com>
> > To:
> > Struts Users Mailing List <user@struts.apache.org>
> > Date:
> > 28-07-2010 22:09
> > Subject:
> > Reading input stream (xml)
> >
> >
> >
> > If we send XML content in the POST/PUT request to Struts action
> > controller,
> > how to read this content in the Action class?
> >
> > -- AB
> >
> >
> > =====-----=====-----=====
> > Notice: The information contained in this e-mail
> > message and/or attachments to it may contain
> > confidential or privileged information. If you are
> > not the intended recipient, any dissemination, use,
> > review, distribution, printing or copying of the
> > information contained in this e-mail message
> > and/or attachments to it are strictly prohibited. If
> > you have received this communication in error,
> > please notify us by reply e-mail or telephone and
> > immediately and permanently delete the message
> > and any attachments. Thank you
> >
> >
> >
>
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


Reply via email to