vendredi septembre 18, 2009
|
GlassFish tip: customize directory listings
With GlassFish being a very capable HTTP server out of the bowser (thank you Grizzly!), it was time for v3 to offer the ability to configure directory listings. It is now possible to have pages listing files per
Configuration can be done inside
You might find it more convenient to have it be part of
Of course there's also the XSLT approach to have yet more control over the presentation. Check the use of GlassFish tips on Java HowTo blog
More tips on GlassFish can be found here. ( déc. 16 2008, 02:53:57 PM CET ) Permalink Comments [1]GlassFish tip - Change the admin console timeout value
The default timeout value for the Web Admin Console of GlassFish v2 is set to 60 minutes by default.
...or modify the value of Previous GlassFish tips are here. ( nov. 28 2007, 06:06:00 AM CET ) PermalinkGlassFish tip: Broken or Corrupted domain.xml
domain.xml (located in
If for some reason GlassFish tip - Have your application be the root application
I've had the question several times about how to install a web application at the root of GlassFish (the use-case being probably to put into production an application on an intranet). Well, as discussed here it's as simple as deploying your application with a
or making sure the The alternate solution is to use the notion of default web module for a given virtual server just like the web admin console is the default for port 4848. Change the HTTP listen port to default 80 (with appropriate privileges on Unix) and you're off to the simplest possible URL for your users. ( août 30 2007, 08:35:33 PM CEST ) PermalinkWhat is a GlassFish master password anyway? With GlassFish v2 (SJS Application Server 9.1) soon to be released in final version, people are starting to move from the development phase to the production planning phase. This means that they are often moving from the "developer" profile to the "cluster" or "enterprise" profiles. One of the questions I often hear is "what is a master password anyway"? Here are a few hints gathered from talking to customers experiencing the use of a more secure and clustered environments (thanks to Sreeni and Kedar for some of these): What is an Domain? What is a cluster? What is an Domain Admin Server (DAS)? What is a Node Agent (NA)? What is a repository?
What is a master password?
What is the default master password?
What is the "default" profile?
One can upgrade from a "developer" to a "cluster" profile on the fly. Can I move back to a "developer" profile?
Why would I need an "Enterprise" profile rather than the "Cluster" profile?
Is it necessary to start the node before starting the domain ?
GlassFish tips for demoers and others (avoid those restarts) One of the good things about having your environment change is that it makes you ask yourself the question of why you ended up with some habits. NetBeans 6.0 Milestone 9 not bundling Tomcat by default (but still supporting it) is one such example I think. On that note I'd invite you to read Geertjan's post on Oddly Shaped Bicycles. So the above thread got the discussion going about NetBeans experiences with people using GlassFish as part of their demos whether it is to demo Java EE 5 features, deploy and run OpenESB artifacts, run OpenPortal, an interoperable JAX-WS Web Service, or a JRuby on Rails application, a whole lot of people use GlassFish nowadays. Whether using Tomcat or GlassFish a seamless experience can be achieved with fast startups or incremental deployments. Startup time for GlassFish is not perfect (we're working on it) but very good for a full-blown application server. Luckily, incremental deployment is most often extremely fast and, if no restart is required which makes the life of demoers but also pretty much everyone else's so much more enjoyable (having an unplanned application server restart during a demo is never good). So here's a little list of do's and dont's when using GlassFish in demos (not your typical use-case but still...). If this looks too long, skip to the last bullet. &bull Use GlassFish v2. First of all if you're using GlassFish v1, this version was pretty much frozen more than a year ago. GlassFish v2 has much better startup time, better error handling, and less restarts (almost everything in the web container is now dynamic). GlassFish v2 is now in beta 2, so if you're using a NetBeans milestone, you really shouldn't be afraid to use a GlassFish beta! :) &bull Delete does not undeploy. One of the most annoying problem reported is application server restarts. With GlassFish v1, this clearly happens when there is a mismatch between you &bull Undeploy only works on existing projets. When using the web UI to undeploy non-existing applications, you get a (what could be a bit friendlier) error/exception. All it says it that it couldn't find the application (most likely a DPL5040). When using the GlassFish web UI, make sure you pay attention to the upper right corner which will tell you ("Restart Required") a restart is needed (and subsequent deployments from NetBeans will trigger a restart if you don't do it yourself before). &bull Hand cleaning. If you don't want to start the AS to clean older applications to then restart it, you can always be careful and remove the appropriate entries in &bull Clean, then restart. Always (re)start your application server before the demo only after any conflicts between &bull Clean or remove the log file. When Starting GlassFish from NetBeans, the log file of the application server is shown in the IDE. If it's big it'll take (what can seem) forever to 'cat' thru before actually showing the start-up sequence. You should probably delete the glassfish logfile ( &bull Restart from scratch? I've you want to be really extra safe, you can re-create the domain using:
&bull Backup/Restore! Probably a better alternative (one that could make most of the above obsolete) is to do domain backup/restore:
If you have reproducible use-cases of an annoying/unneeded application server restart with GlassFish v2, please report it (bug, or comment here).
GlassFish tip: verbose glassfish |