users@glassfish.java.net

Re: Embedded glassfish in offline mode

From: Siraj Ghaffar <Siraj.Ghaffar_at_Sun.COM>
Date: Wed, 27 Jan 2010 11:37:41 -0500

Is it failing to find the tag library dtds in the offline mode? In
regular glassfish these would be under
<install>/glassfishv3/glassfish/lib/dtds. In that case, there might be a
bug in that we need to look up the dtds from the embedded jar (or just
make these part of the default embedded file system). Are you using
one of the embedded mega jars, such as the glassfish-embedded-all.jar?

Thanks

glassfish_at_javadesktop.org wrote:
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>