Derek Ngok wrote:
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="/loadfileservlet">
<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]
