users@glassfish.java.net

Embedded glassfish in offline mode

From: <glassfish_at_javadesktop.org>
Date: Wed, 27 Jan 2010 03:31:37 PST

I have a war file containing some JSTL tags that work fine when the PC running embedded glassfish is connected to the Internet, but it does not work when there is no Internet connection at deploytime. ( looking to resolve http://java.sun.com/jsp/jstl/core)
I see two solutions:
1. package the tag libraries for the jstl core with the application, or direct embedded GF not to look at the Internet for them. But I don't know how.
2. deploy the application when there is an Internet connection, and use the created embedded file system as the file system in subsequent cases without redeploying the app. When I do this, however, the war application is not loaded.

/tmp/embeddedfs is pointing to the directory created when I deployed the app, and this one contains a applications directory containing my war.

This is the relevant piece of code:

Server.Builder builder = new Server.Builder("testBuilder");
EmbeddedFileSystem.Builder efsb = new EmbeddedFileSystem.Builder();
efsb.instanceRoot (new File ("/tmp/embeddedfs"));
EmbeddedFileSystem efs = efsb.build();
builder.embeddedFileSystem(efs);
server = builder.build();
server.createPort(8888);
ContainerBuilder containerBuilder = server.createConfig(ContainerBuilder.Type.web);
server.addContainer(containerBuilder);
server.start();

The files that I put in /tmp/embeddedfs/docroot are retrieved, but the application in /tmp/embeddedfs/applications are not loaded. Maybe I have to do something explicit to load the applications? (there is no domain.xml in this filesystem)

Any ideas?

Thanks,

- Johan
[Message sent by forum member 'johanvos' (johan_at_lodgon.com)]

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