Tuesday, May 27, 2008

Directory Deployment in Glassfish

Directory deployment can help you to improve your productivity when developing web-applications with GlassFish.

Instead of deploying a packaged archive (.war) you can point GlassFish to a directory and let it pick up and deploy the application from there.

You can do this by using the command asadmin deploydir path_to_app_dir.

This has the following benefits:
  • You don't have to assemble the archive-package. That's one step less in the build-process.
  • Changes to your web-sources (JSPs, facelets...) are picked up immediately. There is no need for redeployment! This can be a huge producivity-boost!
  • According to this dcumentation, it should also be possible to dynamically reload the whole application (not only your web-sources)... but for some reason this didn't work for me...

  • The directory you point GlassFish to should have the following structure:

    –|–|web-sources (JSPs, facelets, css ... subdirectories are possible)

    The trick is to configure your IDE/Environment, so that you can work directly on the above structure...

    By touching '.reload', you can force the application to be redeployed.

    No comments:

    Post a Comment

    Related Posts Plugin for WordPress, Blogger...