Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML in the URL

 
Don boscoo
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64712
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Clapham
Sheriff
Pie
Posts: 20966
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And when Bear says "encoded", that means "URL encoded". There's a URLEncoder class which will do that for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic