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

escape char cuts parameter in http post

 
beez beeeez
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So my servlet accepts http posts, which are strings of xml. I get the first parameter with the following and put it in incomingXML.
Enumeration paramNames = request.getParameterNames();
String paramName1 = (String) paramNames.nextElement();
incomingXML = (String) request.getParameter(paramName1);
The problem is that the sender (a 3rd party system whose code i can't see) says they send the xml like this:
<main tag><tag1>blah</tag1><tag2>blah blah &lt; blah</tag2></main tag>
but what i get is chopped off like:
<main tag><tag1>blah</tag1><tag2>blah blah
What I originally thought was that they were sending '<' instead of '&lt;'. But I don't even get that, its just chopped off. Any help is much appreciated. Thanks.
[ October 16, 2003: Message edited by: beez beeeez ]
[ October 16, 2003: Message edited by: beez beeeez ]
[ October 16, 2003: Message edited by: beez beeeez ]
[ October 16, 2003: Message edited by: beez beeeez ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"beez beez"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it
here.
Thanks! and welcome to the JavaRanch!
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic