Sebastien,
On the client, the URLConnection object --
which you get by invoking URL's openConnection() method --has a getOutputStream()
method which returns you an OutputStream object.� You can write your XML to
this OutputStream object.
The servicing JSP (or servlet) can then
retrieve the XML from the ServletInputStream object.� You get the ServletInputStream
object by invoking the request (the ServletRequest object) getInputStream()
method.� The JSP/servlet can then pass the XML to your EJB.
Hope this helps,
Stan Tom
-----Original Message-----
From: ryo
[mailto:[EMAIL PROTECTED]
Sent: Friday, October 31, 2003
8:48 AM
To: jdjlist
Subject: [jdjlist] RE: Transfert
XML by JSP
To read and use the xml sent by the server no problem I can do what
I want.
My problem is to send from the rich client to the JBoss/tomcat
server xml file using http:
java.net.URL url = ""
java.net.URL("http://localhost:8081/please-save-my-data-on-the-database.jsp");
Client �------http------�jsp�-----�ejb�------�DB
Regards.
De :
Andrew Linton [mailto:[EMAIL PROTECTED]
Envoy� : vendredi 31 octobre
2003 16:23
� : jdjlist
Objet : [jdjlist] RE: Transfert
XML by JSP
Sebastien
You can use the InputStreamReader to read the XML file from teste.jsp and put
it into a String variable. Then you can pass that String as a parameter to a call
to an EJB residing on your app server. On the app server parse the String into
a XML document.
HTH
Andy
Sebastien RODRIGUES wrote on 10/31/2003, 12:23 AM:
Dear all,
I don't understand well all of this.
But i think that is not my solution.
I have a java client using jsp with
:
java.net.URL url = ""
java.net.URL("http://localhost:8081/teste.jsp?value=100");
InputStreamReader reader = new InputStreamReader(url.openStream ());
I receive my xml file.
How can i do to send this file from
the client to my server.
Regards.
Message du 30/10/03 20:17
De : James Stauffer
A : jdjlist
Copie � :
Objet : [jdjlist] RE: Transfert XML by JSP
Our code that
sends an Object over has sent Objects over 1MB.
James Amos Nathaniel Stauffer
-----Original Message-----
From: Spencer W. Thomas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 30, 2003 1:03 PM
To: jdjlist
Subject: [jdjlist] RE: Transfert XML by JSP
Certainly if you POST the data it
can be as long as you want, although
some browers get upset if it's larger than 32K bytes per input field.
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.
>
>
|
> <
method="post" enctype="multipart/form-data">
> action=""
>
>
>
>
|
|
>
>
>
>
>
>
>
|
>
> 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=blah
>
> 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]
---
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]
---