-
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 ;-)
ANY better ideas are welcome...these are only my first thoughts
Regards
Graste
BTW: Sorry for my bad english. ;-)
-
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. ;-)
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks