wood burning stoves 2.0*
The moose likes JNLP and Web Start and the fly likes Does Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Does "Embedding JNLP File in Applet Tag" really work?" Watch "Does "Embedding JNLP File in Applet Tag" really work?" New topic
Author

Does "Embedding JNLP File in Applet Tag" really work?

John Semler
Greenhorn

Joined: Dec 11, 2010
Posts: 13
Does "Embedding JNLP File in Applet Tag" really work?

This link says it does: http://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/embeddingJNLPFileInWebPage.html

I assigned junk data to the "jnlp_embedded" attribute and my applet still works! But it will never work without my jnlp_href attribute.

I'm not convinced that this works.

Has anyone successfully used this feature?

Thanks!
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I would assume that the people at Oracle didn't just throw the feature out into the real world without doing some testing. So my guess would be that yes, people have successfully used the feature.
John Semler
Greenhorn

Joined: Dec 11, 2010
Posts: 13
Paul Clapham wrote:I would assume that the people at Oracle didn't just throw the feature out into the real world without doing some testing. So my guess would be that yes, people have successfully used the feature.


The problem I'm having is I wouldn't know if it works or not as the behavior is still the same even if I substitute junk data for the "jnlp_embedded" attribute.

I'd like to be able to verify my work.

Does anyone know a way to check?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Here's what I did:

(1) Create a local copy of the demo page which was linked to from that tutorial which you linked to.

(2) Run that local copy in my browser -- applet shows up okay.

(3) Replace the base-64 string by garbage and run again -- applet shows up okay. (This was your experience too, right?)

(4) Remove the applet from my Java cache.

(5) Run the garbage version of the local copy again -- applet does not run.

So it looks like caching is confusing the issue. (As it so often does.)
John Semler
Greenhorn

Joined: Dec 11, 2010
Posts: 13
Paul Clapham wrote:Here's what I did:

(1) Create a local copy of the demo page which was linked to from that tutorial which you linked to.

(2) Run that local copy in my browser -- applet shows up okay.

(3) Replace the base-64 string by garbage and run again -- applet shows up okay. (This was your experience too, right?)

(4) Remove the applet from my Java cache.

(5) Run the garbage version of the local copy again -- applet does not run.

So it looks like caching is confusing the issue. (As it so often does.)


Seeing this example work from a different perspective gave me the confidence I needed to pursue this further.

It turns out I needed to set the JNLP update "check" attribute to "background". It was set to "always" meaning it has to first reference the copy stored on the server. So if the server was down, the applet would not launch.

It's working fine now.

Thanks for your help!
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Good to hear it!
 
jQuery in Action, 2nd edition
 
subject: Does "Embedding JNLP File in Applet Tag" really work?
 
Similar Threads
Audio Clips in Applets Broken?
Implementing thread in an applet
Why does this Swing (JApplet ) mp3 audio applet not compile!
Repainting jPanel in Applet
Tomcat, JSP and Applet