Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query about POST request body content

 
Tushar Madhukar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a JSP page, which allows users to submit specific info to a web-app. Apart from the form parameters, the POST request needs to contain an XML string in the body of the request too.

Now, I am not sure how to set this XML in the body of the POST request. A normal form submission results in POST with content-type as 'application/x-www-form-urlencoded'. But, in this case, the body will contain XML too which should reflect in the content-type header. Is this kind of paradigm supported in HTTP? How can I do this?

Thanks
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, that wouldn't be reflected in the content type. The only option is to submit the XML as straight text - either in a text (or hidden) field, or a text area. There are no provisions for somehow "embedding" XML in an HTML form.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic