wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes XML in the URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML in the URL" Watch "XML in the URL" New topic
Author

XML in the URL

Don boscoo
Greenhorn

Joined: Sep 20, 2010
Posts: 28
Hi ,

i want to pass XML String to a class from URL:

/reSubmitOrder.do?method=submitOrder&requestXML="+xmlText;

xmlText is the XML String, I'm having the logs in the class am passing it to. I cant get the xml string but when i send the normal string, it works fine like

/reSubmitOrder.do?method=submitOrder&requestXML=hello;

How do i pass XML string in the url. Please Help.

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

All URL values need to be encoded. Once encoded, XML is just like any other encoded text.

Bear in mind there is a length limitation to URLs imposed by the browsers.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

And when Bear says "encoded", that means "URL encoded". There's a URLEncoder class which will do that for you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML in the URL