wood burning stoves 2.0*
The moose likes Servlets and the fly likes How do I encode a parameter in an HTTP request? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How do I encode a parameter in an HTTP request?" Watch "How do I encode a parameter in an HTTP request?" New topic
Author

How do I encode a parameter in an HTTP request?

Alejandro Barrero
Ranch Hand

Joined: Aug 01, 2005
Posts: 309
This is my code:

I am trying to send the text of an XML file, but I am getting the exception:
java.lang.IllegalArgumentException: Illegal character(s) in message header value: "<!-- Lone Tree Aloha XML Order Interface -->
<!-- Copyright 2003, Lone Tree Technology, Inc. -->
<!-- www.LoneTreeTechnology.com -->
<!-- info@LoneTreeTechnology.com -->
<!-- XML Interface Order File version 1.0 -->
<!-- This is a sample order for use with the Aloha XML Order Interface. All
Elements and Attributes are explained. -->
<POSREQUEST ExtTermID="001" ExtRequestID="0009001" ReqAck="N">
<!-- POSREQUEST is the top level element. It is REQUIRED. POSREQUEST has

There are still problems with the XML; same problem with "ISO-8859-1".

Your help will be greatly appreciated,
Alejandro Barrero
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41148
    
  45
Long text should be sent as a POST, not a GET.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I encode a parameter in an HTTP request?
 
Similar Threads
HttpUrlConnection - cXML PunchOutSetupRequest
<url-pattern> not woking
Cannot access a servlet from a Java application
HttpURLConnection - Luanch Browser
Problem sending JMS message from JSP in Tomcat