Dear Derek,
 
I think you misunderstood me: you have to pass xml payload as POST not as GET.  There is no record in the log and there is no limit for the POST (i.e. I think most servers have a limit of 1 MB or so, but you can up that, and there is always a practical limit of long your user will have to wait).  POST is similar to your multipart example (it also uses POST), but you don't need the multipart Java libraries to parse it, nor the control to upload the file.  With POST and xml island (IE-only), XML payload can be dropped from one server and delivered to the other server via the browser:
 
<html>
<head>
<xml id="XMLdata">
  <xmltag>blah</xmltag>
</xml>
<script type="text/_javascript_">
 
function window_onload() {
  document.XMLEngine.xmlData.value = XMLdata.xml;
  document.XMLEngine.submit();
}
 
</script>
</head>
<body >    <font size="2" color="red">Please Wait, Submitting Form...</font>
    <form name="XMLEngine" method="post" action="">
      <input type="hidden" name="xmlData">
    </form>
</body>
</html>
 
What the server sees is:
 
xmlData=<xmltag>blah</xmltag>
 
as a HTTP POST.
 
Greg
-----Original Message-----
From: Derek Ngok [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 10:29 AM
To: jdjlist
Subject: [jdjlist] RE: Transfert XML by JSP

Passing the xml data as a parameter value may not be a solution because there is a limit of the query string (256? Anyone remember the number?). Moreover, web server usually puts the query string in the access log so you may not want that if the data is sensitive.
 
I think this is the html code on client side to upload a file but haven't tried it myself.
 
<table>
<form enctype="multipart/form-data" method="post" name="LoadFile" action="">
<tr>
<td><input size="40" name="file" type="file" value=""></td>
</tr>
<tr>
<td>
  <input value="file" name="Control" type="hidden">
  <input value="Import File" name="impFile" type="submit">
</td>
</tr>
</form>
</table>
 
Hope this helps.
 
Derek
-----Original Message-----
From: Greg Nudelman [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 9:14 AM
To: jdjlist
Subject: [jdjlist] RE: Transfert XML by JSP

2 cents more:
 
If you want to send the XML via browser, it is not that straight-forward.  HTTP is mainly set up to send form data, name=value pairs.  So the easiest way to send XML via browser is to make something like:
 
xmlData=<xmltag>blah</xmltag>
 
Your server will then need to know to read the value of the xmlData and parse it as XML.  If this is what you want to do, and not clear on "how", I can send you an example of the client code.
 
Happy Halloween!
 
Greg
-----Original Message-----
From: James Stauffer [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 7:37 AM
To: jdjlist
Subject: [jdjlist] RE: Transfert XML by JSP

The client should be able to send a post request to a servlet with the XML.  A client that our company wrote opens an HTTP connection the a servlet and sends objects over an ObjectOutputStream so sending text shouldn't be a problem.  If you can't find a sample (I think I saw one years ago on JavaWorld) I might be able to give more details.
 

James Amos Nathaniel Stauffer (Off-site)
Yahoo Messenger: Stauffer_James
MSN Messenger: [EMAIL PROTECTED]
AOL Messenger: Pray 4 Us WI
Telephone: 715-246-2852

-----Original Message-----
From: Sebastien RODRIGUES [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 5:02 AM
To: jdjlist
Subject: [jdjlist] Transfert XML by JSP

Hi,

I want to transfert xml files by jsp.

Server => Client:

All is ok my jsp generate the xml code and the client read the stream and optain the xml file.

Client => Server:

I don't know how can i upload the xml file

Someone can help me?

 

Thanks and regards

--- You are currently subscribed to jdjlist as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] http://www.sys-con.com/fusetalk To unsubscribe from all mailing lists, click: http://sys-con.com/[EMAIL PROTECTED] ---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk To unsubscribe from all mailing lists, click:
http://sys-con.com/[EMAIL PROTECTED]
---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk To unsubscribe from all mailing lists, click:
http://sys-con.com/[EMAIL PROTECTED]
---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk To unsubscribe from all mailing lists, click:
http://sys-con.com/[EMAIL PROTECTED]
---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk To unsubscribe from all mailing lists, click:
http://sys-con.com/[EMAIL PROTECTED]

Reply via email to