users@glassfish.java.net

RE: Re: Applets and JNLP in v3

From: Martin, Ray <armart3_at_tycho.ncsc.mil>
Date: Fri, 20 Aug 2010 06:30:38 -0400

In the war file an applet exists at:
WEB-INF/classes/applet/TestApplet.class

In an xhtml file, the following tag:

<f:verbatim>
  <applet width="500" height="400" code="applet.TestApplet.class" />
</f:verbatim>

Have also tried
  <applet width="500" height="400" code="applet.TestApplet.class"
          codebase="/classes" />

Have also tried
  <applet width="500" height="400" code="classes.applet.TestApplet.class" />


This is about as basic and simple as something can be - and yet, I can get nothing but the "Error. Click for details." on the page. And when clicked says ClassNotFoundException with whichever tag combination that was used above.

Where do I read about the relation of the applet tag and where glassfish has the applet?


-----Original Message-----
From: glassfish_at_javadesktop.org [mailto:glassfish_at_javadesktop.org]
Sent: Thursday, August 19, 2010 6:23 PM
To: users_at_glassfish.dev.java.net
Subject: Re: Applets and JNLP in v3

Ray,

I'm sorry to hear you are so frustrated.

> What does this article say
> http://wiki.glassfish.java.net/Wiki.jsp?page=Gfv31JNLP
> Customization ???
> I read it and I know less afterwards. It does say
> that a developer can
> have some control of its JNLP? But, the article
> provided no way forward
> for a developer.
The wiki.glassfish.java.net pages are obsolete, as noted by the smallish red note in the upper-left corner. The write-up at http://wikis.sun.com/display/GlassFish/Gfv31JNLPCustomization is a more up-to-date version that might be more informative. Keep in mind there is often information in the feature one-pagers that describes the design and/or implementation, which users would not normally need to be concerned with.

So, are you building a Java EE app client and want to customize the JNLP which GlassFish generates for you? That is what that one-pager is about. And that's all. It's not about a general process for building your own Java Web Start app.

>
>
> Is ACC the ONLY way to do JNLP in Glassfish v3? If
> not, where is a
> HOWTO article for v3?

GlassFish provides automatically generated JNLP ONLY for app clients. That is, if you deploy a Java EE app client then GlassFish will generate the JNLP for it.

That said, GlassFish is also a fine platform for hosting your own Java Web Start application that is not an app client. GlassFish itself provides no special help for that because it does not have to. You as the developer are providing the JNLP files as part of your application.

I don't know what IDE you use, but NetBeans (and maybe others) will create JNLP for your non-app-client Java application if you ask it to - and this is for a regular Java GUI application.

To sum up: If you want to build an app client you can have automatic support for Java Web Start from GlassFish itself. If you want to build an app that is not an app client, NetBeans could help you there and could create the JNLP for you.

If you build your own non-app-client app, eventually you need to deploy it to a web server or app server because the JNLP which describes the app and the JARs which the app needs in order to run are served by a web/app server over HTTP.

>
>
> I have struggled for days to get a simple applet to
> stand up from a
> .xhtml page. I cannot get a JNLP to launch an applet
> nor an
> application. I work and work and I get nothing.

Provide us some more information. Are you building an app client or a "standard" Java app?

What steps in the process cause the problems? Do you get any error messages?

>
>
> My team hates Glassfish.

That's too bad. There are lots of developers having good experiences with GlassFish. Sorry yours is not one of them.

My team hates JSF/facelets.
> I work to show
> hem that they are wrong. But, from my activities of
> the last couple of
> days, the wolves are circling - they see the final
> end to these things
> that I have held up as the future.
>
>
> I really did like this Glassfish stuff. But, if I
> cannot make it work,
> I must admit defeat and move on. But, before I go
> down for the count,
> does anyone know of a COMPLETE article on applets and
> jnlp in v3?

Again, you'll need to explain to us a little more exactly what you are trying to accomplish. From your reference to applets I could assume you are not working with an app client. If not, then GlassFish will happily act as your web server for your app. Beyond that, as with any other app that's deployed to any app server, the developer needs to build it.

You won't find much in this forum about building non-app-client Java Web Start apps. You might look in the Java Web Start forum here: http://forums.sun.com/forum.jspa?forumID=38

- Tim
[Message sent by forum member 'tjquinn']

http://forums.java.net/jive/thread.jspa?messageID=480618

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net