If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

A Solution? (and of course a question for better ones)

Thanks, folks.

Probably I will use an applet to start word with a file that I created on
the server (using a servlet). The restriction of applets will not be a (too)
big problem, because it's an intranet-based system I'm working on.
Any idea how I can tell the applet the name of the file I created on the
server? I thought of something like:
1. create the word template (html, using xml/xsl), give it an unique name
(with session-ids?) and save it to disk
2. generate a html-output in the browser with a call to the applet (path/filename
in <params>)
3. open word (Runtime.getRuntime().exec("cmd.exe /C somefile.doc") (runs
on NT systems with office installed ;-)

Re: A Solution? (and of course a question for better ones)

Hello Graste,

You can use java serialization to pass any kind of objects between a servlet
and an applet.

To do that, the applet uses an URLConnection to connect with the servlet,
and get an ObjectInputStream associated to the URLConnection.
The servlet can get a ObjectOutputStream from the HttpServletResponse object.
Then the servlet must serialize an object (using writeObject) and the applet
can deserialize the object (using readObject).

This system allows you to pass any type of object (as complexes as you want)
between the servlet and the applet.

For detailed information don't doubt to email me.

Good luck.

"Graste" <graste@gmx.de> wrote:
>
>Thanks, folks.
>
>Probably I will use an applet to start word with a file that I created on
>the server (using a servlet). The restriction of applets will not be a (too)
>big problem, because it's an intranet-based system I'm working on.
>Any idea how I can tell the applet the name of the file I created on the
>server? I thought of something like:
>1. create the word template (html, using xml/xsl), give it an unique name
>(with session-ids?) and save it to disk
>2. generate a html-output in the browser with a call to the applet (path/filename
>in <params>)
>3. open word (Runtime.getRuntime().exec("cmd.exe /C somefile.doc") (runs
>on NT systems with office installed ;-)
>
>ANY better ideas are welcome...these are only my first thoughts
>
>Regards
>
>Graste
>
>BTW: Sorry for my bad english. ;-)
>