Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Streaming a file from an applet to a new browser window?

 
Victor Roberto Cardona
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I would like to open a new browser window from an applet by using AppletContext.showDocument(). However, that method requires a URL. My content would be coming from an OutputStream opened by the applet. Does anyone know of a way to do this without creating a file, and thus requiring a signed applet? I am assuming that I will need to sign the applet, but I want to make sure before I go that route.

Thanks!
 
Joe Ess
Bartender
Posts: 9339
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Victor.
You are correct in that an applet would need to be signed in order to read a local file, but the Java Tutorial has some options in the section on Applets titled Working with a Server-Side Application. Basically you write your data to the server and point the other window there.
I recommend Java Servlets for a server-side technology. Much easier than writing your own server.
 
Victor Roberto Cardona
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Joe. Thats what I thought the answer would be. I was just hoping that I had overlooked something. Anyway, I think I am going to go ahead and sign my applet, and let it save the file to the user's system. That seems better then bouncing a file against the server. Especially since the files might be a couple of MBs in size.

Anyway, thanks again for your help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic