Next we will configure GlassFish to use our customized JNLP file instead of creating his own. Actually, GlassFish will merge our JNLP file into a new one. And that is a good thing because GlassFish needs to distribute some libraries that the client local Application Client Container must have.
Right-click your SomeApp-app project and select New > GlassFish Descriptor… All defaults apply here:
If glassfish-application-client.xml isn’t already opened by NetBeans, double-click the file and then hit the XML tab. Overwrite the old code with this magic instead:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE glassfish-application-client PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Java EE Application Client 6.0//EN" "http://glassfish.org/dtds/glassfish-application-client_6_0-1.dtd"> <glassfish-application-client> <java-web-start-access> <jnlp-doc>META-INF/custom.jnlp</jnlp-doc> </java-web-start-access> </glassfish-application-client>
We won’t be adding any new projects, files, or move things around. So your final project structure should look something like this:
You might think this is a complicated project structure. And yes indeed it is. But such is the criteria for you to be able to smooth develop the rest of your huge enterprise application as it continuous to grow. You’ll avoid a lot of trouble if you design a modularized application architecture right from the start.