How to send xml data in request in JSP?
I need 开发者_开发问答to send my request as a xml to servlet from jsp. how can i do that?
Two ways (in case by 'jsp' you mean 'from the browser'):
- with form submit - with a
<form method="post" action="..">
. You will have to prepare the XML (with javascript for example) and set it in a field a request parameter, then parse the request parameter on the servlet - with ajax - using XMLHttpRequest or a framework like jQuery. With it you can submit anything.
精彩评论