MessAdmin is a notification system and Session administration for J2EE Web Applications, giving detailed statistics and informations on any Web application. It installs as a plug-in to any Java EE WebApp, and requires zero-code modification. Please visit our web site for more information.
<html>\n<iframe title="AdSense" width="122" height="242" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" src="adsense_120x240.html"></iframe>\n</html>
!Description\nThis plugin is a hook for the administration application.\nContrary to the other plugin types, there is no notion of priority here, but of a unique identifier: the actionID.\n!Included plugins\nto be written... in the meantime, check package {{{clime.messadmin.admin}}}\n!Extra plugins (not included in {{{MessAdmin-Core.jar}}})\n* {{{MessAdmin-ScriptExecutor.jar}}} ({{{clime.messadmin.scripting.ScriptExecutor}}})\n** See ScriptExecutor
A [[ant|http://ant.apache.org]]-based tool is available in the distribution to automatically patch your {{{web.xml}}} and install the required MessAdmin jars and ~JSPs.\nA backup copy of your {{{web.xml}}} is made before changing anything.\n!Requirements\n[[Apache Ant 1.6.5|http://ant.apache.org/]]\n!Usage\n!! Installing into a single web application\nCopy all extra-plugins you want to install into this tool's {{{dist}}} directory. By default, no plug-in is installed.\n\n{{{\n$ ant -Dservlet.version=[23|24|25] -Dwebapp.root=/path/to/webapp/ install\n}}}\n install MessAdmin jars and ~JSPs, and patches {{{web.xml}}} (including the administration servlet)\nwhere {{{servlet.version}}} is the version used in input {{{web.xml}}}.\n\nIf you already copied the MessAdmin jars and jsp files, you can use this tool to only patch your {{{web.xml}}}:\n{{{\n$ ant -Dservlet.version=[23|24|25] -Dweb.xml=/path/to/web.xml webxml.admin\n}}}\n patches {{{web.xml}}} to add MessAdmin data (including declaring the administration servlet)\n\nDon't forget to either set ~J2EE declarative security, or a AuthorizationPassword, on the MessAdmin administration servlet in the patched {{{web.xml}}}!\n!! Installing at the server level\nYou will need to copy all required MessAdmin jar files by hand in you server installation. For Tomcat, this is {{{$CATALINA_HOME/common/lib/}}}. Please consult your friendly user manual for other application servers.\n\nThen, for each application you wish to monitor:\n{{{\n$ ant -Dservlet.version=[23|24|25] -Dweb.xml=/path/to/web.xml webxml\n}}}\n patches {{{web.xml}}} to add MessAdmin data (without declaring the administration servlet).\n\nwhere {{{servlet.version}}} is the version used in input {{{web.xml}}}.\n\n//Tip:// if using [[Tomcat|http://tomcat.apache.org/]], you can simply patch Tomcat's own {{{$CATALINA_HOME/conf/web.xml}}} instead of your applications'. This modification will be available to all applications deployed in this Tomcat instance! Use {{{-Dservlet.version=23}}} for Tomcat 4.x, and {{{-Dservlet.version=24}}} for Tomcat 5.x.\n!FAQ\n* Q: How do I recognize a Servlet 2.3 {{{web.xml}}} from a Servlet 2.4 / 2.5 one?\nA: a Servlet 2.3 {{{web.xml}}} start like this:\n{{{\n<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE web-app PUBLIC\n "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"\n "http://java.sun.com/dtd/web-app_2_3.dtd">\n<web-app id="My_WebApp_ID">\n}}}\nwhile a Servlet 2.4 {{{web.xml}}} start like this:\n{{{\n<?xml version="1.0" encoding="UTF-8"?>\n<web-app id="My_WebApp_ID" version="2.4"\n xmlns="http://java.sun.com/xml/ns/j2ee"\n xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">\n}}}\nand a Servlet 2.5 {{{web.xml}}} like this:\n{{{\n<?xml version="1.0" encoding="UTF-8"?>\n<web-app xmlns="http://java.sun.com/xml/ns/javaee"\n xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"\n version="2.5" [metadata-complete="true"]>\n}}}
!Description\nThis plugin is a hook for exposing application-specific HTML data in the administration servlet. Should you want to expose tabular data, you can extend the abstract base class {{{clime.messadmin.providers.spi.BaseTabularApplicationDataProvider}}}.\nAll plugins of this type are run.\n!Included plugins\n* {{{clime.messadmin.providers.userdata.ServletContextInitParametersProvider}}}\n** Priority: 0\n** displaying {{{web.xml}}}'s {{{<context-param>}}} elements\n* {{{clime.messadmin.providers.userdata.resourcebrowser.ResourceBrowser}}}\n** Priority: 10\n** Browse the content of your ~WebApp war, and download key files (e.g. configuration files)!\n* {{{clime.messadmin.providers.userdata.ClassLoaderDisplayer}}}\n** Priority: 50\n** displaying the application's [[ClassLoader|http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html]]\n!Extra plugins (not included in {{{MessAdmin-Core.jar}}})\n* {{{MessAdmin-ServletStats.jar}}} ({{{clime.messadmin.providers.lifecycle.ServletStatsDisplayer}}})\n** See ServletStats\n* {{{MessAdmin-Log4J.jar}}} ({{{clime.messadmin.providers.lifecycle.Log4JProvider}}})\n** See Log4J\n* {{{MessAdmin-Ehcache.jar}}} ({{{clime.messadmin.providers.ehcache.EhCacheStatistics}}})\n** See [[Ehcache]]
!Description\nThis plugin is a hook for the lifecycle of the application.\nAll plugins of this type are run.\nNote: the invocation order of Providers is reversed in case of application destruction.\n!Included plugins\n* {{{clime.messadmin.providers.lifecycle.EvilSingletonsUnregisterer}}}\n** Priority: {{{Integer.MAX_VALUE}}}\n** Takes care of deregistering (some of) the evil Singletons when the app shuts down, thereby avoiding (well, trying to avoid) OOM ({{{java.lang.OutOfMemoryError}}}) on hot restart...\n*** core Java: {{{java.beans.Introspector.flushCaches();}}}\n*** core Java: {{{java.sql.DriverManager.deregisterDriver(driversLoadedByThisContextClassLoader);}}}\n*** [[commons-IO|http://commons.apache.org/io/]] 1.3+: {{{org.apache.commons.io.FileCleaner.exitWhenFinished();}}} (only if commons-IO is in {{{/WEB-INF/lib/}}})\n*** [[commons-logging|http://commons.apache.org/logging/]] 1.0.4-: {{{org.apache.commons.logging.LogFactory.release(Thread.currentThread().getContextClassLoader());}}}\n*** [[Log4J|http://logging.apache.org/log4j/]] 1.x: {{{org.apache.log4j.LogManager.shutdown();}}}\n*** [[LogBack|http://logback.qos.ch/]] 1.x: {{{ch.qos.logback.classic.selector.servlet.ContextDetachingSCL().contextDestroyed(ServletContextEvent sce);}}}/%\n\n%/\n!Extra plugins (not included in {{{MessAdmin-Core.jar}}})\n* {{{MessAdmin-JMX.jar}}} ({{{clime.messadmin.providers.jmx.JMXProvider}}})\n** Priority: n/d\n** This plugin exposes MessAdmin data via [[JMX|Install-JMX]].\n* {{{MessAdmin-SessionKiller.jar}}} ({{{clime.messadmin.providers.lifecycle.TomcatSessionKiller}}})\n** Priority: n/d\n** Corrects a Tomcat bug whereby some expired [[HttpSession|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html]] are never invalidated, by periodically (every 20 minutes) iterating over all [[HttpSessions|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html]] and manually invalidating expired ones.
As an alternative to ~J2EE declarative security, the MessAdmin administration servlet can optionally require a password before granting access. Simply uncomment the {{{AuthorizationPassword}}} init-parameter in {{{web.xml}}} and set your password:\n{{{\n<servlet>\n <!-- MessAdmin Administration Servlet -->\n <servlet-name>MessAdminServlet</servlet-name>\n <servlet-class>clime.messadmin.admin.MessAdminServlet</servlet-class>\n <init-param>\n <param-name>AuthorizationPassword</param-name>\n <param-value>[SomePassword]</param-value>\n </init-param>\n</servlet>\n}}}\nFrom there, you can either add a {{{?password=[your password]}}} in the first url, or wait to be requested an HTTP Access Authentication (use any user name).
MessAdmin comes with a range a plugin types for you to [[extend|CreatePlugins]]:\n* User-defined data\n** UserNameProvider: fetch the user name for the current session\n** LocaleProvider: fetch the user locale for the current session\n** SessionDataProvider: expose your own session-related data\n** ApplicationDataProvider: expose your own application-related data\n** ServerDataProvider: expose your own server-related data\n* Events\n** RequestLifeCycleProvider: hook for request-level events\n** RequestExceptionProvider: hook for reporting exceptions while processing a request\n** SessionLifeCycleProvider: hook for session-level events\n** ApplicationLifeCycleProvider: hook for application-level events\n** ServerLifeCycleProvider: hook for server-level events\n* Administration\n** AdminActionProvider\n* Miscellaneous\n** SizeOfProvider\n** SerializableProvider
MessAdmin brings you a lot of benefits. Please choose you profile:\n* [[IT manager|ITManager]]\n* [[developer|Developer]]\n* [[system administrator|SystemAdministrator]]
P1, P2, P3: priority (must, may, won't fix)\nS1, S2, S3: customer severity\n----\n~P2S2 1.1\n{{{<script>}}} is injected after {{{<head>}}} tag (or end of page).\nIf {{{head}}} has attributes, or is written {{{<head >}}} (or any other combination), current alg. will break (default to end of html document).\nWe need to improve our "head" parser to understand blanks and attributes.\nThis will only affect XHTML applications with a non-IE browser.\nWorkaround: make sure all your pages have an {{{<head>}}} or {{{<HEAD>}}} string literal.\n----\n~P3S2 3.0\nThe workaround a Sun bug where some objects' size could not be computed is not complete: there are some cases where object sizing will fail (and display {{{-1}}}). Please report any instance.\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5012949\n----\n~P3S2 3.0\nCPU time count is not accurate (it is sometimes counted as 0) with BEA Weblogic 8.1. I believe this is a ~WebLogic bug.
This MessAdmin plugin re-creates the [[ClickStream|http://www.opensymphony.com/clickstream/]] monitoring utility.\nEach session will log the last 100 requests, and will need up to 30 kilo-bytes of memory.
!A note on plugin priority\nEach plugin has a priority in order to computed plugin execution order.\nPlugins are executed in ~ASCending priority: lower numbers first.\nDepending of the plugin type, all plugins of a group are executed, or only until one can give a result.\n!How to write your own plugin\nNote: all plugin interfaces are in the package {{{clime.messadmin.providers.spi}}}. See AvailablePluginsTypes for a list of all available plugin types.\n\nPlugins are packaged as standard [[Service Providers|http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#Service%20Provider]]: you will need to write a Java class and a very simple plugin descriptor.\nThe plugin classes should be lightweight and quick to load. Implementations should avoid complex dependencies on other classes and on native code. The usual pattern for more complex services is to register a lightweight proxy for the heavyweight service. Plugin classes should also be thread-safe.\n\nShould you need to load a localized message, you can conveniently do so by calling the static method {{{clime.messadmin.i18n.I18NSupport#getLocalizedMessage(String baseName, String key, Object[] args)}}} which will take care of selecting the correct [[Locale|http://java.sun.com/javase/6/docs/api/java/util/Locale.html]], loading the corresponding [[ResourceBundle|http://java.sun.com/javase/6/docs/api/java/util/ResourceBundle.html]], and [[formatting|http://java.sun.com/javase/6/docs/api/java/text/MessageFormat.html]] the message if necessary.\n\nSay you want to write a plugin to fetch the user name from the [[HttpSession|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html]].\n!!Step 1: write your Java class\nYou will need to write a Java class implementing the plugin interface and a default no-arg constructor:\n{{{\npackage mypackage.messadmin.plugin;\n\nimport javax.servlet.http.HttpSession;\nimport clime.messadmin.providers.spi.UserNameProvider;\n\npublic class MyUserNameFetcher implements UserNameProvider {\n\n public MyUserNameFetcher() {\n super();\n }\n\n /**\n * @see clime.messadmin.providers.spi.BaseProvider#getPriority()\n */\n public int getPriority() {\n return 0;\n }\n\n /**\n * @see clime.messadmin.providers.spi.UserNameProvider#guessUserFromSession(javax.servlet.http.HttpSession)\n */\n public Object guessUserFromSession(HttpSession httpSession) {\n Object user = null;\n // fetch your user name here\n return user;\n }\n}\n}}}\n!!Step 2: write your plugin descriptor\nCreate a file named after the interface you are implementing in {{{META-INF/services/}}}.\nIn our example, this will be:\n{{{META-INF/services/clime.messadmin.providers.spi.UserNameProvider}}}\n\nPut your FQ class name in this file.\nIn our example:\n{{{\n# Providers for guessing the user name from the HttpSession\nmypackage.messadmin.plugin.MyUserNameFetcher\n}}}\n!!Step 3: deploy!\nCreate a jar file of your compiled class and your plugin descriptor.\nDrop this jar file (myPlugin.jar) next to {{{MessAdmin-Core.jar}}}, or in {{{WEB-INF/lib/}}} and restart your webapp.\nThat's all!
MessAdmin\nLiveDemo
As a developer, integrating MessAdmin early to your project give you tools to detect problems early, like putting non-[[serializable|http://java.sun.com/javase/6/docs/api/java/io/Serializable.html]] or too many objects in the [[HttpSession|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html]]. You can also monitor what's in the [[HttpSession|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html]] at runtime, thereby checking what's supposed to be there is really there, and that you didn't leave any leftover when you're done.
Quick notes on the developer side of MessAdmin/%\n%/\n!~MOTOs\n*I'm a library, thus I shouldn't have any external dependencies.\n**Reasoning: I'm fed up with can't-live-without libraries depending on dozens of 3rd-party libs (yes, I'm looking at //you//, Hibernate!), causing versioning hell along the (class)path.\n*As we aim production boxes, we must be as fast, error-free and memory-light as possible./%\n\n%/\n!Technical Insights\nOr, "how the hell does this stuff works?"\n* Track [[HttpSessions|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html]] via the ~MessAdminLister ({{{<listener>}}} in {{{web.xml}}})\n* Servlet Filter ~MessAdminFilter knows how to inject html code at response-time on the fly, but only for html responses (not images, pdfs, etc.)!\n* "Simple" stateless ~WebApplication to administer data given by the Session Tracker, using the Filter to do the final display work/%\n\n%/\n!FAQ (developer version)\n* Why couldn't I send messages when using MessAdmin 1.x and Servlet 2.3 (~J2EE 1.3)?\n<<<\nIn this servlet version (2.3), filters are not invoked when a request is made through the [[RequestDispatcher|http://java.sun.com/javaee/5/docs/api/javax/servlet/RequestDispatcher.html]] (Request Forwarding or Including) (very common for generating the response in frameworks like Struts). Invoking filters for RD requests is part of the Servlet 2.4 specification.\nThis means we need servlet 2.4 to manage the situation!\nMessAdmin 2.0 works around the Servlet 2.3 specification shortcomings.\n<<<\n* Where are the [[JUnit|http://www.junit.org]] tests?\n<<<\nThere are (almost) none! :-) If you would like to contribute some, I'll be more than grateful!\n<<<\n* Can I re-use your tag libraries?\n<<<\nWhile the license allows you this option, I strongly discourage you to do so. Use a full-blown JSTL implementation instead, like the Apache Jakarta one <http://jakarta.apache.org/taglibs/index.html>.\nYou are of course free to take the non-JSTL part!\n<<<\n* On measuring the size of a Java Object...\n<<<\nFallacy: You can measure an object's size by serializing it into a byte stream and looking at the resulting stream length\nThe reason this does not work is because the serialization layout is only a remote reflection of the true in-memory layout.\nOne easy way to see it is by looking at how Strings get serialized: in memory every char is at least 2 bytes, but in serialized form Strings are ~UTF-8 encoded and so any ASCII content takes half as much space.\nSee <http://www.javaworld.com/javaqa/2003-12/02-qa-1226-sizeof_p.html>\n\nsizeof operator is not available in Java. But, at times you may want to know size of your Java objects.\nSize of an object depends on VM implementation. Number of header words in an object ("class pointer" etc.), pointer size (32/64 bit) and alignment variations make object size dependent on VM implementation.\nAn article by Vladimir Roubtsov explains how to measure sizeof objects.\nWith ~J2SE 1.5, we can get size in 2 new ways (as I know), without using profilers or native agents.\n 1. We can use java.lang.instrument.Instrument.getObjectSize API.\n 2. We can use jmap -histo to get object histogram. For each class, jmap prints number of objects and total size in bytes occupied by those objects. We can divide total size by number of objects to get size of an individual object.\nSee also [[HttpSession size]].\n<<<\n/%\n\n%/\n!PACKAGES and CLASSES\n*{{{clime.messadmin.admin}}}\n** Admin application\n*{{{clime.messadmin.core}}}\n** This is the place of the Servlet Listener (~MessAdminListener)\n*{{{clime.messadmin.filter}}}\n** This is the place of the Servlet Filter (~MessAdminFilter, + supporting files)\n*{{{clime.messadmin.model}}}\n** Model classes (really!)\n*{{{clime.messadmin.providers.spi}}}\n** Plugins interface\n*{{{clime.messadmin.providers.*}}}\n** Default plugins implementation\n*{{{clime.messadmin.taglib.*}}}\n** Modified copy of part of JSTL taglib\n*{{{clime.messadmin.utils}}}\n** Some reusable utility classes (who hasn't?)
AKA the legal jumbo mumbo...\n\nThis product includes software developed by the [[Apache Software Foundation|http://www.apache.org/]].\nThis product includes software developed by [[Vlad Roubtsov|http://www.javaworld.com/columns/jw-qna-index.shtml]].\nThis product includes software developed by [[Mikael Grev|http://migbase64.sourceforge.net/]].\n[[getElementsBySelector.js|http://simon.incutio.com/js/getElementsBySelector.js]] copyright © 2003 Simon Willison.\n[[behavior.js|http://www.ccs.neu.edu/home/dherman/javascript/behavior/]] copyright © 2005 Dave Herman.\n{{{resizetaOverlay.js}}} from the [[Resizeable Textarea FireFox extension|https://addons.mozilla.org/firefox/3818/]], copyright © 2005 Raik Juergens.\n{{{RAM.js}}} based on [[RAM.js|http://webreflection.blogspot.com/2007/10/cow-web-ram-javascript-function-to.html]] copyright © 2007 Andrea Giammarchi.\n\nThis software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied. Use at your own risk. Etc, etc, etc...
Browse your filesystem directly from within MessAdmin!
This MessAdmin plugin displays [[Ehcache|http://www.ehcache.org]] statistics.\nRequires Ehcache >= 1.3 at runtime (Ehcache 1.4.1 for compiling from source).
[[Disclaimer]]/%\n%/\n* How stable is this product? How much memory/CPU does it use?\n<<<\nMessAdmin is already used in production sites. Its overhead is very small (about 600 bytes per session) and it doesn't make any heavy computation (less than 0.5 millisecond per request on a battery-running Pentium M@600 ~MHz; that's right: 0.6 ~GHz. And less than 0.3 millisecond per request @1.6 ~GHz).\nWith its plug'n'play capabilities, there is no reason to not add it to all your running applications!\n<<<\n* Some session attributes are displayed with an alarming red background! What does this mean?\n<<<\nThose attributes are not [[Serializable|http://java.sun.com/javase/6/docs/api/java/io/Serializable.html]]. This is a requirement for persisting [[HttpSessions|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html]] on disk (e.g. in a clustered environment).\n<<<\n* Some session are displayed with a light yellow background! What does this mean?\n<<<\nThose sessions are accessed via a secure connexion (e.g. https). Note that if your application-server is behind a web server, and if this web-server is handling https instead of your application-server, you may not know if a given session is secure or not.\n<<<\n* Why are some sizes {{{-1}}}?\n<<<\nThere was an error while computing an object size. Most likely you are getting this on the "total session size" while testing with WSAD 5.1.\n<<<\n* Why are some sizes really big?\n<<<\nComputing the size of a Java Object is a very tricky business. See [[HttpSession size]] for details.\n<<<\n* JMX does not work!\n<<<\nAre you using Java 5?\nDid you enable management for your application server?\nSee [[Install-JMX]] for instructions.\n<<<\n* I can't send messages to my users!\n<<<\nYour users may have a popup blocker. They will need to enable popups for your site in order to get messages.\n<<<\n* I can't send messages to my users (really)!\n<<<\nYou (or the framework you are using) are calling {{{HttpServletResponse.getOutputStream()}}} to write text, instead of {{{HttpServletResponse.getWriter()}}}.\n{{{getOutputStream()}}} should only be used to write binary data.\nKnown framework having that bad habit: [[Click|http://click.sourceforge.net/]] version < 1.1.\nCredit to Sven Herschel for analysing the issue.\n<<<\n* Are there any known bugs?\n<<<\nNot really, more like shortcomings. :-) See the [[Bugs]] page.\n<<<\n* What's in the MessAdmin name?\n<<<\nWell, Session administration was a mess before... therefore this tool to Administrate the Mess! :-)\n<<<\n* Any links?\n<<<\nOther projects can monitor your web applications, even if more intrusive or less capable than MessAdmin:\n* [[ClickStream|http://www.opensymphony.com/clickstream/]]\n* [[Glassbox Inspector|https://glassbox-inspector.dev.java.net/]]\n* [[InfraRED|http://infrared.sourceforge.net/]]\n* [[PSI Probe|http://code.google.com/p/psi-probe/]]\n* [[JAMon|http://jamonapi.sourceforge.net/]]\n* [[JManage|http://www.jmanage.org/]]\n<<<\n* Any developer FAQ?\n<<<\nSure! See the [[Developer FAQ|DeveloperFAQ]]\n<<<
MessAdmin brings you a lot of [[benefits|Benefits]] by providing you the followings features.\n\nSee and interact with MessAdmin via\n* built-in administration servlet\n* JMX (if available)\n\nServer-related statistics and operations:\n* name and version of your application server software\n* JVM version and vendor\n* user running the server (with home and temp directories)\n* server uptime\n* disk free space (requires Java 6)\n* free and used memory\n* system properties\n* system environment variables\n* list of threads\n\n~WebApp-related statistics and operations:\n* number of active Sessions, with memory size\n* number of passive Sessions\n* maximum number of concurrent Sessions (peak), with date at which this event happened\n* total number of created Sessions\n* total number of hits\n* total Request size (incoming bandwidth)\n* total Response size (outgoing bandwidth)\n* list of ~ServletContext (application-scope) attributes, with size and remove operation\n* {{{web.xml}}} context parameters\n* list the content of application {{{war}}} file\n* application ~ClassLoader\n\nSession-related statistics and operations:\n* remote user name\n* remote user locale\n* remote host IP (includes knowledge of reverse-proxies)\n* last Request URL\n* isSecure flag (e.g. https)\n* SSL information (if secure connection): cipher suite name, algorithm bit size\n* date created\n* date of last access\n* TTL (time to live before expiration)\n* total number of hits\n* total, min, max, mean: Request size\n* total, min, max, mean: Response size\n* last Request size and date\n* last Response size and date\n* list of ~HttpSession attributes, with size and remove operation\n* flags non-serializable ~HttpSession attributes\n* send an HTML message to all or any user of the application\n* invalidate any ~HttpSession\n\nWith optional [[plugins|Plugins]]:\n* list of last http requests for each user\n* Ehcache statistics\n* Log4J loggers (change log levels at runtime)\n* servlet performance statistics\n* execute [[Java Scripts|http://java.sun.com/javase/6/docs/technotes/guides/scripting/]] (require Java 6)\n* and much more ([[write your own plugins|CreatePlugins]]!)\n\nAs a bonus, MessAdmin takes care of some evil singleton cleanup at application shutdown, thereby avoiding some dreadful OOM ({{{java.lang.OutOfMemoryError}}}) on hot restart:\n* JDBC drivers: {{{java.sql.DriverManager}}} - Evil Singleton (drivers should be located at application-server level)\n* {{{java.beans.Introspector}}} - Slightly less Evil singleton\n* Jakarta Commons Logging <= 1.0.4\n* Jakarta Commons IO >= 1.3\n* ~Log4J & ~LogBack MDC's\nYou will still have to take care of your own [[ThreadLocals|http://java.sun.com/javase/6/docs/api/java/lang/ThreadLocal.html]]; there's nothing I can do for you there...
To get started with this blank TiddlyWiki <<version>>, you'll need to modify the following tiddlers:\n* SiteTitle & SiteSubtitle: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)\n* MainMenu: The menu (usually on the left)\n* DefaultTiddlers: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened\nYou'll also need to enter your username for signing your edits: <<option txtUserName>>
As there is no subversion repository yet, [[contact us|mailto:cedrik_lime@users.sourceforge.net?subject=[MessAdmin i18n] ]] to get the current sources, as a set of Eclipse 3 + WTP projects.\n\nEach of those projects have a standard Maven 2 layout, so you should be able to quickly find your way around.\n\nShould you want to build the project outside Eclipse, simply use the Ant script provided (requires [[Ant|http://ant.apache.org]] >= 1.6.5), or use "{{{ant dist-bin}}}" for a full binary distribution archive.\n\nTo translate MessAdmin, you will need to translate some properties files; you won't have to go into the code (although you are most welcome to look around if interested!).\nFor that, copy all properties files into your language. For example:\n{{{sessionDetail.properties}}} -> {{{sessionDetail_es.properties}}}\nThere are quite a few properties files per project, use your favourite IDE find command to avoid missing one.\nPlease stick to ~ISO-Latin-1 for properties files encoding, if possible. If not, don't forget to tell me so that I do not mess up you work! A good tool for this job is the [[ResourceBundleEditor|http://sourceforge.net/projects/eclipse-rbe/]] eclipse plugin.\n\nI will update the documentation with your name. Please refrain from changing the documentation since this wiki system does not have easy merge.\n\nShould you have any question and/or suggestion, please contact me and I'll do my best to give you an answer!
config.options.chkHttpReadOnly = true;
Computing a {{{HttpSession}}} memory size is a challenging task at best.\n\nMeasuring the size of a Java Object is tricky enough: you can't measure an object's size by serializing it into a byte stream and looking at the resulting stream length (the reason this does not work is because the serialization layout is only a remote reflection of the true in-memory layout; consider for example a String, which is 2 bytes/char in memory, but little more than 1 byte/char once serialized in the usual cases). Moreover, pointer size (32/64 bit) and alignment variations make object size highly dependent on VM implementation.\nSee [[Vladimir Roubtsov's article|http://www.javaworld.com/javaqa/2003-12/02-qa-1226-sizeof_p.html]] for more details.\n\nAlong with this difficulty, consider now the following two {{{HttpSession}}}s containing each a Struts ~ActionForm (accessors omitted):\n{{{\npublic class MyAF1 extends ActionForm {\n String var1;\n Integer var2;\n}\n}}}\n{{{\npublic class MyAF1 extends ActionForm {\n String var1;\n String var2;\n}\n}}}\nAt first glance, the size of those objects should be quite small (about 100 bytes each), shouldn't it? Well, you'd be surprised... as they can easily reach a megabyte!\nWhy is it so? Let's have a look at the base class, {{{ActionForm}}}:\n{{{\npublic abstract class ActionForm implements Serializable {\n /** <p>The servlet instance to which we are attached.</p> */\n protected transient ActionServlet servlet;\n\n /** <p>The MultipartRequestHandler for this form, can be <code>null</code>.</p> */\n protected transient MultipartRequestHandler multipartRequestHandler;\n...\n}\n}}}\nAh, we are onto something here! Each {{{ActionForm}}} has a pointer to its servlet and request handler, which in turn have pointers to other important structures! From them come the huge size of your Struts' {{{ActionForm}}}s. But does those big objects have an impact on your server's memory? Not really, as it turns: an {{{ActionServlet}}} is a singleton: there is only 1 instance ever in the JVM. Which means that 2 (or more) {{{ActionForm}}}s will ''share'' a single instance of their {{{ActionServlet}}}.\n\nSo... The true memory footprint of your {{{HttpSession}}} should really be: {{{sizeOf(myActionForm) - sizeOf(the ActionServlet contained inside myActionForm)}}} ({{{multipartRequestHandler}}} and others omitted).\nHow can we "guess" how to do that? Well, it's not that easy. One could be tempted to say\n> Hey, those fields are {{{transient}}}, let's //not// count {{{transient}}} fields!\nIndeed, this idea looks good, neat and clever. But do we have a warranty that each and every framework will "transient-ify" their "common" pointers? Worse, is a {{{transient}}} field really not worth counting? Let's have a look at a very commonly used data structure: a [[HashMap|http://java.sun.com/javase/6/docs/api/java/util/HashMap.html]].\n{{{\npublic class HashMap extends AbstractMap implements Map, Cloneable, Serializable {\n /**\n * The table, resized as necessary. Length MUST Always be a power of two.\n */\n transient Entry[] table;\n...\n}}}\nNot a chance, //not// counting {{{transient}}} fields leads to size each and every {{{HashMap}}} to a small, fixed value, independently of the data contained inside. This behaviour is clearly unacceptable.\n\nSo here we are, back to square one. It is an unfortunate fact that computing the memory footprint of an {{{HttpSession}}} is a very difficult task, highly dependant on how your application is built.\nThere are two workarounds:\n* create 10 or so identical sessions, look at the total {{{HttpSession}}}s size (in the Application Statistics pane of MessAdmin) and divide this by the number of sessions.\n* create a few {{{HttpSession}}}s and record their size. Next, create your target {{{HttpSession}}} and record the new total size. Your last created {{{HttpSession}}} size //should// be the difference between those two sums.\nWhile those workarounds work in a controlled environment, they can't be used in production.
MessAdmin is part of your tool arsenal to build greater quality applications; see [[developer|Developer]].\nBut MessAdmin doesn't stop there. Once built, applications must run reliably. MessAdmin can help you monitor your applications and solve problems before they become a nuisance to your business. See [[system administrator|SystemAdministrator]].
Add the following to {{{WEB-INF/web.xml}}}:\n{{{\n<filter>\n <!-- MessAdmin Servlet Filter -->\n <filter-name>MessAdminFilter</filter-name>\n <filter-class>clime.messadmin.filter.MessAdminFilter</filter-class>\n</filter>\n\n<filter-mapping>\n <filter-name>MessAdminFilter</filter-name>\n <url-pattern>/*</url-pattern>\n</filter-mapping>\n\n<listener>\n <!-- MessAdmin listener -->\n <listener-class>clime.messadmin.core.MessAdminListener</listener-class>\n</listener>\n}}}
Copy {{{MessAdmin-JMX.jar}}} in your {{{WEB-INF/lib/}}} directory, or next to {{{MessAdmin-Core.jar}}}.\n\nTo enable JMX monitoring, you need to both use Java >= 5, and enable management within your application server.\nFor Tomcat (version 5.x and more), you can use (//warning: highly insecure setup!//):\n{{{\nCATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9004 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false\n}}}\nSee http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html for more information.
Installing at the server level is done in 3 easy steps.\n!1. Copy ~MessAdmin jars in your server\nCopy {{{MessAdmin-Core-[version].jar}}} into your server's classpath (along with required [[plugins|Plugins]]). For Tomcat, this is {{{$CATALINA_HOME/common/lib/}}}. Please consult your friendly user manual for other application servers.\n!2. Patch your applications {{{web.xml}}}\nFor each ~WebApp of this server you wish to monitor, <<tiddler Install-Core>>\nAs an alternative, you can use the [[ant tool|AntTool]] for this step.\n\n//Tip:// if using [[Tomcat|http://tomcat.apache.org/]], you can simply patch Tomcat's own {{{$CATALINA_HOME/conf/web.xml}}} instead of your applications'. This modification will be available to all applications deployed in this Tomcat instance!\n!3. Deploy the administration application (not required for JMX monitoring)\nNote: this step is optional. You can choose to use [[JMX administration|Install-JMX]] only.\n* Deploy {{{MessAdmin.war}}} in your application server. You can rename it first should you wish to use another context name.\n* <<tiddler web.xml-security>>\nAdministration URL will look like:\n{{{\nhttp://127.0.0.1:8080/MessAdmin/\n ^ ^ ^\n | | +- MessAdmin.war administration WebApp context name\n +- your server name and port\n}}}\nAlways use the administration servlet, do not call the ~JSPs directly!
You have 2 ways of interacting with MessAdmin: with the built-in administration webapp, and/or JMX.\n\nIf you want to install MessAdmin in a war or ear file based web app, you will have to explode this web app so that you can place the MessAdmin files inside. Feel free to repackage ("implode") after you're done with the modifications.\n!Graphical Résumé\n{{{\n/ <- copy the MessAdmin folder (with the jsp's inside) here\n|\n+-- WEB-INF/\n |\n +-- lib/ <- copy MessAdmin-Core-[version].jar here (along with required plugins)\n |\n +-- web.xml <- modify this file according to following documentation\n}}}\nIf you do not want to modify your {{{web.xml}}} by hand, a [[ant-based tool|AntTool]] is available in the distribution to automatically patch it, as well as copy the necessary jar and jsp files.\n!Detailed instructions\nBefore you can interact with MessAdmin, you need to install it.\n* copy {{{MessAdmin-Core-[version].jar}}} in {{{WEB-INF/lib/}}} (along with required [[plugins|Plugins]])\n* copy the {{{MessAdmin}}} folder (containing the jsp's) into your application context root (next to your other html and jsp files).\n* add the following to {{{WEB-INF/web.xml}}}:\n{{{\n<filter>\n <!-- MessAdmin Servlet Filter -->\n <filter-name>MessAdminFilter</filter-name>\n <filter-class>clime.messadmin.filter.MessAdminFilter</filter-class>\n</filter>\n\n<filter-mapping>\n <filter-name>MessAdminFilter</filter-name>\n <url-pattern>/*</url-pattern>\n</filter-mapping>\n\n<listener>\n <!-- MessAdmin listener -->\n <listener-class>clime.messadmin.core.MessAdminListener</listener-class>\n</listener>\n\n<servlet>\n <!-- MessAdmin Servlet -->\n <servlet-name>MessAdminServlet</servlet-name>\n <servlet-class>clime.messadmin.admin.MessAdminServlet</servlet-class>\n <!-- Uncomment if you want to password-protect access to the administration servlet\n <init-param>\n <param-name>AuthorizationPassword</param-name>\n <param-value>[SomePassword]</param-value>\n </init-param>\n -->\n <load-on-startup>-1</load-on-startup>\n</servlet>\n\n<servlet-mapping>\n <servlet-name>MessAdminServlet</servlet-name>\n <url-pattern>/messadmin</url-pattern><!-- You can change this pattern! -->\n</servlet-mapping>\n}}}\nNote: you can use whichever url-pattern you want for the MessAdmin servlet.\n\nAdministration URL will look like:\n{{{\nhttp://127.0.0.1:8080/someContext/messadmin\n ^ ^ ^ ^\n | | | +- Administration servlet name as defined in web.xml\n | | +- your WebApp context name\n +- your server name and port\n}}}\nAlways use the administration servlet, do not call the ~JSPs directly!/%\n\n%/\n!Optional tasks\n* You can monitor your application either via the built-in MessAdmin administration webapp, and/or via JMX. Should you want to disable the administration webapp, simply delete the {{{<servlet>}}} and {{{<servlet-mapping>}}} elements from your {{{web.xml}}}.\n* <<tiddler web.xml-security>>
You can choose to install MessAdmin either at the ~WebApplication-level, or at the Server-level.\nYou do not need to modify the source code of your application.\nSome of the installation options can be customized. Please see the detailed documentation.\nIf upgrading from a previous version, do not forget to delete old versions of MessAdmin jars!/%\n\n%/\n!Installing for a single ~WebApp\nPlease refer to the [[WebApp installation documentation|Install-WebApp]] for detailed instructions.\nYou will have to:\n* [[download|http://sourceforge.net/project/showfiles.php?group_id=147751]] the current distribution :-)\n* copy {{{MessAdmin-Core.jar}}} along with any required [[Plugins]] in your application's {{{WEB-INF/lib/}}} directory\n* copy the {{{MessAdmin}}} folder (containing the {{{.jsp}}} administration pages) into your document root directory\n* copy some configuration to your {{{web.xml}}}\nAs an alternative, you can use the supplied [[ant-based tool|AntTool]] to automate the process./%\n\n%/\n!Installing for monitoring a whole Server\nPlease refer to the [[Server installation documentation|Install-Server]] for detailed instructions.\nYou will have to:\n* [[download|http://sourceforge.net/project/showfiles.php?group_id=147751]] the current distribution :-)\n* copy {{{MessAdmin-Core.jar}}} along with any required [[Plugins]] in your server's classpath\n* copy some configuration to your applications {{{web.xml}}} (or use the supplied [[ant-based tool|AntTool]] to automate the process)\n* deploy the administration application: {{{MessAdmin.war}}}
This MessAdmin plugin exposes MessAdmin data via JMX.\nPlease see the [[installation instructions|Install-JMX]].
MessAdmin is Copyright © 2005-2009, [[Cédrik LIME|mailto:cedrik_lime@users.sourceforge.net?subject=[MessAdmin]%20]].\n\nMessAdmin is licensed under the [[Simplified BSD license|http://www.opensource.org/licenses/bsd-license.php]], that gives you the freedom to use it pretty much however you want, including for commercial purposes, as long as you keep my copyright notice.\nI would of course appreciate a short email should you re-use my code!\n\n[[Disclaimer]]
Preview the next leading-edge version of MessAdmin!\n\nInstructions:\n# [[Create a few sessions|http://www.cedrik.fr/demo/]]\n# [[Play with the administration application|http://www.cedrik.fr/MessAdmin/]] (use password: {{{demo}}})\n\nWarnings:\n* This live demo is based on an early snapshot of MessAdmin. It is not feature-complete, and it should not be assumed that this is representative of the final release.\n* This server is my own personal computer. As such it may not be available 24/7. Please be kind with it! :-)
!Description\nThis plugin is responsible for obtaining the currently logged in user locale from a given [[HttpSession|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html]].\nExecution will stop as soon as one of the plugin returns a non-null result.\n!Included plugins\n* {{{clime.messadmin.providers.locale.KnownLocations}}}\n** Priority: 10\n** Search "known locations" in the [[HttpSession|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html]] for a [[java.util.Locale|http://java.sun.com/javase/6/docs/api/java/util/Locale.html]]: { {{{"Locale"}}}, {{{"java.util.Locale"}}} }\n** This plugin has explicit support for [[Struts 1.x|http://struts.apache.org/1.x/]] and [[Spring 1.x and 2.x|http://www.springframework.org/]]\n* {{{clime.messadmin.providers.locale.JSTLProvider}}}\n** Priority: 20\n** Checks eventual session-scope Locale set by JSTL\n* {{{clime.messadmin.providers.locale.ReflectionTapestryProvider}}}\n** Priority: 30\n** Search for a [[Tapestry 3|http://tapestry.apache.org/tapestry3/doc/api/org/apache/tapestry/IEngine.html]] [[or 4 Engine|http://tapestry.apache.org/tapestry4/apidocs/org/apache/tapestry/IEngine.html]] and invoke the {{{getLocale()}}} method on it\n** Note: this provider implementation uses reflection, to avoid linking against [[Tapestry|http://tapestry.apache.org/]] libs\n* {{{clime.messadmin.providers.locale.JBossSeamProvider}}}\n** Priority: 40\n** Support for [[JBoss Seam|http://www.seamframework.org/]]\n** Note: this provider implementation uses reflection, to avoid linking against [[JBoss Seam|http://www.seamframework.org/]] libs\n* {{{clime.messadmin.providers.locale.AttributesIterator}}}\n** Priority: 200\n** Search all attributes for a single {{{java.util.Locale}}}
View your application logs and change your log levels directly inside MessAdmin!\n\nThis MessAdmin plugin gives you a [[Log4J|http://logging.apache.org/log4j/]] {{{Appender}}} that will display log events in the MessAdmin administration webapp. In addition, you will be able to dynamically change your {{{Logger}}} levels at runtime.\nThis plugin requires [[Log4J|http://logging.apache.org/log4j/]] 1.2.9 or better.\n\nTo install, simply drop {{{MessAdmin-Log4J.jar}}} next to {{{MessAdmin.jar}}} or in {{{WEB-INF/lib/}}},\nand use the {{{clime.messadmin.providers.log4j.Log4JAppender}}} appender in your Log4J configuration:\nfor {{{log4j.xml}}}:\n{{{\n<appender name="messadmin" class="clime.messadmin.providers.log4j.Log4JAppender">\n <param name="threshold" value="INFO"/>\n <layout class="org.apache.log4j.PatternLayout">\n <param name="ConversionPattern" value="%d{ISO8601} [%-5p] %c %x - %m%n"/>\n </layout>\n</appender>\n\n<!-- example logger -->\n<logger name="com.myapp.something">\n <level value="warn"/>\n <appender-ref ref="messadmin"/>\n</logger>\n}}}\nfor {{{log4j.properties}}}:\n{{{\nlog4j.appender.MESSADMIN=clime.messadmin.providers.log4j.Log4JAppender\nlog4j.appender.MESSADMIN.layout=org.apache.log4j.PatternLayout\nlog4j.appender.MESSADMIN.layout.ConversionPattern=%d{ISO8601} [%-5p] %c %x - %m%n\nlog4j.appender.MESSADMIN.Threshold=INFO\n\n# Example logger\nlog4j.logger.com.myapp.something=MESSADMIN, WARN\n}}}
[[Introduction|MessAdmin]]\n[[Features]]\n[[Benefits]]\n[[Requirements]]\n[[ScreenShots]]\n[[Download & Install|Installation]]\n[[Plugins]]\n[[FAQ]]\n<<tag ChangeLog>>\n[[License / Contact]]\n\n[img[SourceForge.net Logo|http://sourceforge.net/sflogo.php?group_id=147751&type=1][http://sourceforge.net/projects/messadmin/]]\n\n[img[Please support this project!|http://www.paypal.com/en_US/i/btn/x-click-but04.gif][https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=cedrik_lime%40users%2esourceforge%2enet&item_name=MessAdmin&no_shipping=1&cn=Your%20comments&tax=0¤cy_code=EUR&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8]]\n\n<<tiddler AdSense>>
<script src="http://www.google-analytics.com/ga.js" type="text/javascript">\n</script>\n<script type="text/javascript">\ntry {\nvar pageTracker = _gat._getTracker("UA-466295-1");\npageTracker._trackPageview();\n} catch(err) {}\n</script>
<div id="SearchEnginesFirstDiv" style="display: none;">MessAdmin is a notification system and Session administration for J2EE Web Applications, giving detailed statistics and informations on any Web application. It installs as a plug-in to any Java EE WebApp, and requires zero-code modification. Please visit our web site for more information.</div>
<meta http-equiv="content-language" content="en">\n<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'>\n<link rel="schema.DC" href="http://purl.org/DC/elements/1.1/">\n<meta name="DC.Title" content="MessAdmin">\n<meta name="DC.Creator" content="LIME, Cédrik">\n<meta name="DC.Description" content="Notification system and Session administration for J2EE Web Applications">\n<meta name="DC.Date.created" content="2005">\n<meta name="DC.Type" content="Software">\n<meta name="DC.Format" content="text/html">\n<meta name="DC.Language" scheme="RFC3066" content="en">\n<meta name="DC.Rights" content="copyright 2005-2009 Cedrik LIME">\n<meta name="author" content="Cedrik LIME">\n<meta name="copyright" content="copyright 2005-2009 Cedrik LIME">\n<meta name="robots" content="index,follow,archive">
MessAdmin is a light-weight and non-intrusive tool for monitoring and interacting with Java ~HttpSession. MessAdmin can be added to any ~J2EE application, with zero change to the monitored application!\nWith MessAdmin, you can:\n* display statistics about any Web Application\n* monitor all active ~HttpSessions (including their [[size|HttpSession size]])\n* interact with and see detailed information about any session\n* send html messages to any users\nMessAdmin can be added to any ~J2EE application. And apart from a very minor change to your {{{web.xml}}}, you don't need to change anything at all in your web application! That's right, no coding, no application change!\nAdministration is done either with a built-in servlet, and/or via JMX.\n\nMessAdmin brings you a lot of [[benefits|Benefits]], whether you are an [[IT manager|ITManager]], a [[system administrator|SystemAdministrator]] or a [[developer|Developer]].\n\nUse the menu on the left to learn more.
Since version 3.0, MessAdmin can accept a [[range of different plugins|AvailablePluginsTypes]].\nWhile MessAdmin comes with a default set of plugins which should be enough for the majority of people, you can now [[extend MessAdmin|CreatePlugins]] in a very easy way.\n\nIn addition to plugins in {{{MessAdmin-Core.jar}}}, the following external plugins are available:\n* [[JMX]]\n* ServletStats\n* ClickStream\n* Log4J\n* [[Ehcache]]\n* ScriptExecutor\n* DiskBrowser\n* SessionKiller\n* [[Serializable]]\n\nTo install a plugin, simply copy the plugin jar in your {{{WEB-INF/lib/}}} directory, or next to {{{MessAdmin-Core.jar}}}.\n
!Description\nThis plugin is a hook for reporting exceptions when processing a [[HttpRequest|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html]].\nAll plugins of this type are run.\n!Included plugins\n* {{{clime.messadmin.providers.lifecycle.KnownThreadLocalsCleaner}}}\n** Priority: {{{Integer.MAX_VALUE}}}\n** Takes care of cleaning up (some of) the [[ThreadLocals|http://java.sun.com/javase/6/docs/api/java/lang/ThreadLocal.html]], thereby avoiding (well, trying to avoid) OOM ({{{java.lang.OutOfMemoryError}}}) on hot restart...\n*** [[Log4J|http://logging.apache.org/log4j/]] 1.x: {{{org.apache.log4j.NDC.remove();}}} and {{{org.apache.log4j.MDC.getContext().clear();}}}\n*** [[LogBack|http://logback.qos.ch/]] 1.x: {{{ch.qos.logback.classic.MDC.clear();}}}\n!Extra plugins (not included in {{{MessAdmin-Core.jar}}})\n* {{{MessAdmin-ServletStats.jar}}} ({{{clime.messadmin.providers.lifecycle.ServletStatsGatherer}}})\n** See ServletStats\n* {{{MessAdmin-ClickStream.jar}}} ({{{clime.messadmin.providers.lifecycle.ClickStreamGatherer}}})\n** See ClickStream
!Description\nThis plugin is a hook for the lifecycle of the [[HttpRequest|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html]].\nAll plugins of this type are run.\nNote: be very careful with performance while writing any plugin of this type, as it will be run on every incoming request!\nNote: the invocation order of Providers is reversed in case of request destruction.\n!Included plugins\n* {{{clime.messadmin.providers.lifecycle.KnownThreadLocalsCleaner}}}\n** Priority: {{{Integer.MAX_VALUE}}}\n** Takes care of cleaning up (some of) the [[ThreadLocals|http://java.sun.com/javase/6/docs/api/java/lang/ThreadLocal.html]], thereby avoiding (well, trying to avoid) OOM ({{{java.lang.OutOfMemoryError}}}) on hot restart...\n*** [[Log4J|http://logging.apache.org/log4j/]] 1.x: {{{org.apache.log4j.NDC.remove();}}} and {{{org.apache.log4j.MDC.getContext().clear();}}}\n*** [[LogBack|http://logback.qos.ch/]] 1.x: {{{ch.qos.logback.classic.MDC.clear();}}}\n* {{{clime.messadmin.providers.user.SpringSecurity2UserName}}} / {{{clime.messadmin.providers.user.SpringSecurity3UserName}}}\n** Priority: 48/49\n** Cache the [[Spring Security|http://static.springframework.org/spring-security/]] authenticated user name for latter display by the {{{HttpRequestRemoteUser}}} UserNameProvider\n* {{{clime.messadmin.providers.user.AcegiUserName}}}\n** Priority: 50\n** Cache the [[Acegi Security|http://www.acegisecurity.org/]] authenticated user name for latter display by the {{{HttpRequestRemoteUser}}} UserNameProvider\n!Extra plugins (not included in {{{MessAdmin-Core.jar}}})\n* {{{MessAdmin-ServletStats.jar}}} ({{{clime.messadmin.providers.lifecycle.ServletStatsGatherer}}})\n** See ServletStats\n* {{{MessAdmin-ClickStream.jar}}} ({{{clime.messadmin.providers.lifecycle.ClickStreamGatherer}}})\n** See ClickStream
MessAdmin needs at least [[Java 1.3|http://java.sun.com/j2se/1.3/]], and a Java Servlet container (Servlet 2.3/~J2EE 1.3).\nThe built-in administration application needs a JSP 1.2, Servlet 2.3 compatible container (~J2EE 1.3; e.g. [[Tomcat 4|http://tomcat.apache.org]]).\nJMX administration requires [[Java 5|http://java.sun.com/j2se/1.5.0/]].
Note: this section is rather outdated. We are working on taking new screenshots to expose new features. In the meantime, feel free to explore our LiveDemo!\n\nLet's first take the [[session list view|ss_list.html]]. There you can sort the information by clicking on the column headers (don't forget this is a screenshot; it won't work here!), manually expire some sessions and send messages.\nBefore doing any of that, Have a look at session [[0920E225E358F91C0F990BC8533471A0|ss_detail.html]]. You have a summary of interesting data for this session (including the remote IP in case you need to physically locate the user) as well as every attributes in the session (which you can remove).\nNow let's come back to the previous screen and send a message to this user. Notice how you can use HTML. Once sent, notice the little 'M' in the [[resulting list|ss_list2.html]]. On his next action, the user will get a [[popup|popup.gif]] with your message.\nFinally, let's finish with some statistics on the [[web application|ss_webapp.html]] itself.\n\nOf course, all of the above operations are also available via JMX, but what's the point of taking screenshots of JConsole? ;-)
Execute [[Java Scripts|http://java.sun.com/javase/6/docs/technotes/guides/scripting/]] on your server! Requires Java 6.
This MessAdmin plugin computes if an object is Serializable.\nThe algorithm used here is more comprehensive, but slower than the default one used in ~MessAdmin-Core.
!Description\nThis plugin is responsible for computing if a given a Java Object is [[Serializable|http://java.sun.com/javase/6/docs/api/java/io/Serializable.html]].\nYou should rarely need to write your own.\nOnly the first plugin (minimum priority) will be run.\n!Included plugins\n* {{{clime.messadmin.providers.serializable.MaybeSerializableProvider}}}\n** Priority: 10\n** While this implementation is quick, it may not be accurate:\n*** a return value of {{{true}}} does not waranty that such an object is really serializable.\n*** a return value of {{{false}}} is a 100% warranty that the object is not serializable.\n** In other words, it //may// miss some non-Serializable objects.\n!Extra plugins (not included in {{{MessAdmin-Core.jar}}})\n* {{{MessAdmin-Serializable.jar}}} ({{{clime.messadmin.providers.serializable.FullySerializableProvider}}})\n** Priority: 0\n** This plugin is accurate, although much slower than the default plugin.
!Description\nThis plugin is a hook for exposing server-specific HTML data in the administration servlet. Should you want to expose tabular data, you can extend the abstract base class {{{clime.messadmin.providers.spi.BaseTabularServerDataProvider}}}.\nAll plugins of this type are run.\n!Included plugins\n* {{{clime.messadmin.providers.userdata.SystemPropertiesProvider}}}\n** Priority: 10\n** Displays the JVM's system properties\n* {{{clime.messadmin.providers.userdata.SystemEnvironmentProvider}}}\n** Priority: 20\n** Displays the JVM's environment variables\n** Requires Java 5+\n* {{{clime.messadmin.providers.userdata.ThreadsDumper}}}\n** Priority: 50\n** Displays current threads in the JVM\n!Extra plugins (not included in {{{MessAdmin-Core.jar}}})\n* {{{MessAdmin-ScriptExecutor.jar}}} ({{{clime.messadmin.scripting.ScriptExecutor}}})\n** See ScriptExecutor
!Description\nThis plugin is a hook for the lifecycle of the server.\nAll plugins of this type are run.\nNote: the invocation order of Providers is reversed in case of server destruction.\n!Included plugins\nNone. [[Write your own|CreatePlugins]]!
This MessAdmin plugin gathers statistics on an application Servlets.\nEach servlet will need about 500 bytes of memory.
!Description\nThis plugin is a hook for exposing session-specific HTML data in the administration servlet. Should you want to expose tabular data, you can extend the abstract base class {{{clime.messadmin.providers.spi.BaseTabularSessionDataProvider}}}.\nAll plugins of this type are run.\n!Included plugins\nNone. [[Write your own|CreatePlugins]]!\n!Extra plugins (not included in {{{MessAdmin-Core.jar}}})\n* {{{MessAdmin-ServletStats.jar}}} ({{{clime.messadmin.providers.lifecycle.ServletStatsDisplayer}}})\n** See ServletStats\n* {{{MessAdmin-ClickStream.jar}}} ({{{clime.messadmin.providers.lifecycle.ClickStreamDisplayer}}})\n** See ClickStream
This MessAdmin plugin corrects a Tomcat bug whereby some expired ~HttpSession are never invalidated, by periodically (every 20 minutes) iterating over all ~HttpSessions and automatically invalidating expired ones.
!Description\nThis plugin is a hook for the lifecycle of the session.\nAll plugins of this type are run.\nNote: the invocation order of Providers is reversed in case of session destruction.\n!Included plugins\nNone. [[Write your own|CreatePlugins]]!\n!Extra plugins (not included in {{{MessAdmin-Core.jar}}})\n* {{{MessAdmin-JMX.jar}}} ({{{clime.messadmin.providers.jmx.JMXProvider}}})\n** Priority: n/d\n** This plugin exposes MessAdmin data via [[JMX|Install-JMX]].
<<search>><<closeAll>><<permaview>><<newTiddler>>/%<<newJournal 'DD MMM YYYY'>>%/<<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
Notification system and Session administration for ~J2EE Web Applications
MessAdmin
http://messadmin.sourceforge.net/
!Description\nThis plugin is responsible for computing the size of a Java Object.\nYou should rarely need to write your own.\nExecution will stop as soon as one of the plugin returns a result >= 0.\n!Included plugins\n* {{{clime.messadmin.providers.sizeof.ObjectProfilerProvider}}}\n** Priority: 0\n** Based on Vlad Roubtsov's 2003 article: http://www.javaworld.com/javaqa/2003-12/02-qa-1226-sizeof_p.html
/***\nPlace your custom CSS here\n***/\n/*{{{*/\n.tabContents .shadow {color: #888;} /* from TiddlyWiki 2.1: http://trac.tiddlywiki.org/ticket/37 */\n/*}}}*/\n
Being very light weigh, MessAdmin can be integrated in all your running ~J2EE applications. From there, it will be very easy to answer questions like "how many users are on the system right now?", "which country do they come from?", "what was the maximum load we had for this application and when?", or "how much data is going tough our lines?", as well as "who's logged in and what are they doing?".\nAnd should you need to perform an emergency shutdown (or any other unexpected system maintenance), at least now you can warn your users beforehand by sending them messages!
TiddlyWiki defines itself as "a reusable non-linear personal web notebook". It can be considered as a standalone wiki application. More information is available at the [[TiddlyWiki web site|http://www.tiddlywiki.com]]. Thank you, Jeremy Ruston, for writing this fine piece of software!
Help us make the next version of MessAdmin available in //your// language!\nDo you have what it takes to have your name in the credits file? Then [[contact us|mailto:cedrik_lime@users.sourceforge.net?subject=[MessAdmin i18n] ]]! Knowledge of Java Properties would be a plus, but is not required.\nSee [[HowTo translate]] for details.
!Description\nThis plugin is responsible for obtaining the currently logged in user name from a given [[HttpSession|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html]].\nExecution will stop as soon as one of the plugin returns a non-null result.\n!Included plugins\n* {{{clime.messadmin.providers.user.AcegiUserName}}}\n** Priority: n/d\n** Support for [[Acegi Security|http://www.acegisecurity.org/]]\n* {{{clime.messadmin.providers.user.SpringSecurity2UserName}}} / {{{clime.messadmin.providers.user.SpringSecurity3UserName}}}\n** Priority: n/d\n** Support for [[Spring Security|http://static.springframework.org/spring-security/]]\n* {{{clime.messadmin.providers.user.HttpRequestRemoteUser}}}\n** Priority: 10\n** Returns last request [[RemoteUser|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html#getRemoteUser()]] or [[UserPrincipal|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html#getUserPrincipal()]], if any\n* {{{clime.messadmin.providers.user.JBossSeamProvider}}}\n** Priority: 60\n** Support for [[JBoss Seam|http://www.seamframework.org/]]\n** Note: this provider implementation uses reflection, to avoid linking against [[JBoss Seam|http://www.seamframework.org/]] libs\n* {{{clime.messadmin.providers.user.KnownLocations}}}\n** Priority: 100\n** Search "known locations" in the [[HttpSession|http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html]] for a user name: { {{{"Login"}}}, {{{"User"}}}, {{{"userName"}}}, {{{"UserName"}}}, {{{"Utilisateur"}}} }\n* {{{clime.messadmin.providers.user.AttributesIterator}}}\n** Priority: 200\n** Search all attributes for a single [[java.security.Principal|http://java.sun.com/javase/6/docs/api/java/security/Principal.html]] or [[javax.security.auth.Subject|http://java.sun.com/javase/6/docs/api/javax/security/auth/Subject.html]]
* First internal release\n* JDK 5, JSTL 1.1 and Servlet 2.4 (~J2EE 1.4) only
!Additions\n* Released a ~JSP-only version\n!Improvements\n* Fixed compatibility with JDK 1.4\n* Partly fixed compatibility with Servlet 2.3 (~J2EE 1.3) (see the doc for known limitations)
!Additions\n* Released a JSTL 1.0 version\n!Improvements\n* Fixed compatibility with JDK 1.3
First public release.\nMany thanks to Christian Picard for pushing me so hard to get MessAdmin out of the door. This project would never have gone public without you, Christian.\n!Improvements\n* session-taglib migration (internal use, to ease future developments)\n* some code and documentation clean-up
NOTE: we now require Java >= 1.4 (for object sizing). Please contact us if you need 1.3 compatibility.\n!Additions\n* Added Session attributes size\n* Added number of hits for a Session\n* Added some stats in the back-end (needs front-end and more testing):\n** number of hits (~WebApp)\n** bandwidth used (incoming/outgoing)\n** current/avrg/max (peak)/total # of sessions\n** Session sizing\n!Improvements\n* Bug fix: forgot to report a change in the JSTL 1.0 sessionDetail.jsp which caused the page throw an exception (missing tag attribute varName). Credit to Ajay Chaudhary for reporting the issue.\n* Bug fix: {{{<script>}}} element was injected at end of page. XHTML pages can not accept {{{<script>}}} element at a wrong location.\n<<<\nWe now parse response to inject our script after {{{<head>}}} instead. Fall back to end of doc if no {{{<head>}}} (malformed html).\nSo far, only IE is broken (as usual), as it digests XHTML as simple HTML (and thus, works when it shouldn't). All other browsers errored while parsing (as they should).\n<<<\n* First shot at a JMX API (unreleased yet)
!Additions\n* Added last/total request/response length to profile used outgoing bandwidth for a given session\n* Redesigned session details screen: there was too much information in there for a simple list\n* Added ~WebApp-related statistics:\n** hits count\n** bandwidth used (incoming/outgoing)\n** current/peak/total-created number of active sessions\n** application-scope attributes list (with size)\n!Improvements\n* Bug fix: when refreshing a sorted session list, sort order (ASC or DESC) was lost\n* code clean-up to clearly separate ~WebApp and Session-related data, in preparation for some JMX stuff
!Additions\n* Added isSecure attribute to session information (yellow background in sessions list)\n* Added Session size\n* Added Session and ~ServletContext attributes Class name in session-detail and webapp view, as attribute value tool-tip (don't let toString() fool you!)\n* Added ~WebApp platform name and startup time
!Additions\n* JMX management! That's right, you can now bypass MessAdmin servlet to monitor your ~WebApp (requires Java 5)!\n> Don't forget to enable JMX in you application server...\n* Added [[Jakarta Commons Logging|http://commons.apache.org/logging/]] cleanup to webapp shutdown-time cleanup (JCL <= 1.0.4)\n* Added {{{META-INF/MANIFEST.MF}}} with package version\n!Improvements\n* Restored Java 1.3 compatibility\n* Full Java EE 1.3 compatibility (you couldn't send messages in previous versions)\n* Documented the webapp shutdown-time cleanup (this was coded since 1.0)\n* Relaxed requirements for demo webapp (Java EE 1.4 -> 1.3, removed JSTL dependency for smaller download)\n* Made sure the administrative message popup is on top of the browser window (it could sometimes appear below)\n* Bug fix: Session list could have difficulties to be displayed under heavy load\n* Bug fix: script injection did not recognize all-caps {{{<HEAD>}}} (it was looking for lower-case {{{<head>}}}).\n> Note that it still does not recognize {{{<head >}}} element with attributes (rare case).\n* Bug fix: script injection could sometime mess up with the rendering of host page\n* Bug fix: noJSTL ~JSPs were horribly broken. Sorry about that!\n* removed JSTL 1.0 ~JSPs. Use either the JSTL 1.1 or the no-JSTL version\n* shuffled the sources a bit to better conform to maven2 layout
!Improvements\n* Bug fix: object sizing when testing webapps in WSAD 5 could lead to {{{java.lang.NoClassDefFoundError: org.eclipse.core.resources.IWorkspaceRoot}}}. This version has been hardened against such a possibility.\n<<<\n [[JavaWorld forum thread|http://www.javaworld.com/javaforums/showflat.php?Cat=&Board=958763&Number=15235&page=0&view=collapsed&sb=5&o=]]\n Credit to Siva Prakash Papineni <psprakash@users.sourceforge.net> for reporting the issue.\n<<<
!Improvements\n* Really fix the WSAD bug with wasn't by version 2.0.1...
!Additions\n* added Session stats:\n** last used server time (time the server spent to service this user's last request)\n** minimum / maximum time needed to service a user's request\n* added ~WebApp stat: total used server time\n* added request query string to lastRequestURL to capture GET parameters\n* Added Ant build scripts (Maven is too much): much easier to build a release now! :)\n* integrated MessAdmin with [[Improve Foundation|http://www.improve-foundations.com]] (commercial ~SOA-oriented development factory platform)\n* now also count webapp hits (along with request/response size and used server time) when no ~HttpSession is created ("anonymous" browsing)\n!Improvements\n* replaced useless session stat "Used Time" (was: session last accessed time - session creation time) with "Total Used Server Time", which is more meaningful (total time the server spent to service that user)\n* eliminated all reflection calls for even more speed\n* simplified installation a bit (no distinction between ~J2EE 1.3 and 1.4 now)\n* First pass at native code for object sizing, when using Java 5+\n> unreleased yet; will not speed up computations, only more accurate for 64 bits ~JVMs (hopefully)
!Additions\n* major code reorganization and refactoring (including improvements to the build tools)\n> a side effect is that JMX will never be late again on the administration webapp. In fact, it's now quite the contrary!\n* brand new [[plug-in|Plugins]] system for easy extension ([[write your own!|CreatePlugins]]). Some default plug-ins are included in the core distribution; please see the documentation for details.\n<<<\nsome included plug-ins are:\n* user name and locale extraction. Some default plug-ins are included in the core distribution, with support for [[Tapestry 3.x and 4.x|http://tapestry.apache.org]], [[Struts 1.x|http://struts.apache.org/1.x/]], [[Spring 1.x and 2.x|http://www.springframework.org]] and (partially) JSTL\n* fetch application-specific information (return either raw XHTML or tabular data)\n> no default implementation: write your own!\n> Thanks to Hammed RAMDANI for expanding upon the original idea\n* optional plugin to automatically invalidate expired ~HttpSessions (seems to be a recurrent tomcat problem)\nexpect even more new plugins in the next versions!\n<<<\n* new ant-based tool to easily install required MessAdmin files and patch your {{{web.xml}}} file\n> Thanks to Pascal BELLUGUE for asking for such a tool!\n* added optional "AuthorizationPassword" init parameter to password-protect the administration servlet (easier to use than ~J2EE security)\n* added flag (red background) for non-serializable session attributes: important for clusters or persisting sessions\n* administration webapp now asks for confirmation before invalidating sessions\n* added autorefresh option on (some) administration web pages\n* added HTTP request Method (displayed in front of 'lastRequestURL')\n* added authentication scheme (as user name tooltip)\n* added more tooltip information on administration web pages; hover over text elements to find them!/%\n\n%/\n!Improvements\n* in previous MessAdmin versions, if the application server started up with serialized sessions (e.g. non-empty {{{SESSION.ser}}} in Tomcat), those sessions where invisible from MessAdmin.\n>Those sessions will now be automatically discovered on their first access.\n* corrected ~HttpSession size to only compute the size of its attributes (no more 3MB empty session!)\n* got rid of the ~JSTL-version ~JSPs. Installation is that much easier now.\n* corrected missing '?' when displaying a query string\n* renamed "Inactive Time" to "Idle Time"\n* Switched to TiddlyWiki for the documentation and web site. Looks better now. :-)\n* Thanks to Karsten Voges and Pascal BELLUGUE for private beta testing!
This is a bug-fix release, with controlled fixes from the 4.0 branch.\nMany thanks to all of you who contacted me to report bugs, suggest improvements, or simply say kind words!\n!Improvements\n* the administration application now works on Safari\n* made the administration application work with ~IE6 when served behind an Apache Httpd 2 server. Thanks to Jason Barry for reminding me to fix this old bug!\n* bug fix: injected session messages would disappear even if not displayed (e.g. request was for an image or a pdf). They are now kept in memory until successfully displayed\n* workaround a Sun bug where some objects' size could not be computed (credit to François Mercier for both reporting and fixing this issue)\n** http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5012949\n* corrected bug in the session list where the page would not be well-formed XML in some cases (credit to Sven Herschel for reporting the issue)\n* corrected problem where Resin would 3.0 complain about an abstract tag. Credit to vega65 at users.sourceforge.net for discovering the issue
Note to self: never publish a release in a hurry, or risk forgetting some fixes! :)\n!Improvements\n* workaround for a ~NullPointerException with BEA Weblogic 8.1.5 / Java 1.4.2_05 / XP. Credit to Fernando Boaglio for reporting the issue\n* made the administration application work with Oracle's picky JSP processor (tested with Oracle ~OC4J 10.1.3)
!Additions\n* ''Server monitoring!'' Why monitor a single webapp when you can watch the whole server?\n* added Server information page and associated operations\n* new plugin type: ServerDataProvider\n* ''new plugin: ~ServletStats'', displaying statistics on application servlets\n* ''new plugin: ~ClickStream'', which re-creates the [[ClickStream|www.http://opensymphony.com/clickstream/]] monitoring utility\n* ''new core plugin: ~ThreadsDumper'', displaying active server threads\n* new plugin type: RequestExceptionProvider, which handles exception reporting\n* reworked administration pages for easier navigation and use (no more popups!)\n* added SSL information (for secure connections): cipher suite name, algorithm bit size\n* added servlet request processing errors (error count + last error)\n* added MessAdmin version number to the administration pages\n* the administration application now fully uses the "Redirect after POST" pattern. You can use the back button without fear! :)\n* moved remaining text documentation into this TiddlyWiki\n* //incompatible change:// plugin type ApplicationDataProvider has been split in 2: ApplicationDataProvider and SessionDataProvider. Please update your plugins!\n* //incompatible change:// the AntTool syntax has slightly changed\n* removed deprecated classes and methods/%\n\n%/\n!Improvements\n* corrected bug where plugins would be executed in an incorrect order\n* removed potential contention point which could have affected performance under heavy load on multi-processor systems\n* simplified (yet again) installation instructions\n* beautified bytes number formatting\n* second try to get maven working the way I want. Dependency management is great, but documentation not so... It's almost there, except I couldn't manage to generate {{{META-INF/MANIFEST.MF}}} the way I want, so it is back to ant for now. (For the technically inclined: I need maven-jar-plugin 2.1, which is not the current version yet)\n* completed Ant build scripts to generate a full bin+src distribution: even easier to build a release now! :)\n* Thanks to Pascal BELLUGUE for private beta testing!/%\n\n%/\n!Known issues\n* MessAdmin administration application does not work with BEA ~WebLogic 9.x. It has been tested, and works ok, with BEA ~WebLogic 8.1, Oracle ~OC4J 10.1.3, Tomcat 4.1 and 5.5, ~JBoss 4.0.\n* Plugins must be installed at the same level as {{{MessAdmin-Core.jar}}} (i.e. you can't install at the server level and have an application-specific plugin)
!Improvements\n* corrected bug where {{{MessAdmin.war}}} would not find its tag library. Doh! (Credit to Ian Rowlands and Edward Gabriel Moraru for reporting the issue.)
!Additions\n* ''administration webapp is now internationalised!'' Now is a good time to set your preferred language in your favourite browser... ;-)\n** French translation by Cédrik LIME\n** [[Translators wanted!|Translators (I18N) Wanted]]\n* ~WebLogic 9 users, rejoice! While the administration application is still not compatible with your application server, you can add a {{{?format=text}}} to the administration URL to access its data! Thanks to Anand Ayyagary for the incentive.\n* ''new core plugin: ~ServletContextInitParametersProvider'', displaying {{{web.xml}}}'s {{{<context-param>}}} elements\n* ''new core plugin: ~ClassLoaderDisplayer'', displaying the current application's [[ClassLoader|http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html]] to help you get rid of those pesky ~ClassCastExceptions\n* support for [[JBoss Seam|http://www.seamframework.org/]] for displaying user name and locale. Thanks to Anand Ayyagary for the suggestion.\n* support for [[Acegi Security|http://www.acegisecurity.org/]] for getting the currently authenticated user name\n* data blocks displayed in administration pages are now collapsible\n* all textareas are now resizeable ([[FireFox|http://www.mozilla.com/]] and [[CSS3-compatible|http://www.w3.org/TR/css3-ui/#resize]] browsers only)\n* application-level message is now displayed only once every 60 seconds instead of on every request. Thanks to Ian Rowlands for the idea!\n* now displays free disk space for temp and working directory, as tooltips in the Server view (requires Java 6)\n* now also displays the total size of all active ~HttpSessions for a given application\n* server memory is now also displayed as a graph/%\n\n%/\n!Improvements\n* bug fix: plugins can now be installed at the application level (previously they needed to be at the same level as {{{MessAdmin-Core.jar}}}, i.e. you couldn't install MessAdmin at the server level and have an application-specific plugin)\n* custom plugins extending {{{BaseTabularXXXDataProvider}}} can now influence the generated table look. See {{{BaseTabularDataProvider}}} for methods you can override\n* JMX now exports session size\n* ServletStats plugin now sorts its display by total used time, instead of number of hits\n* added css to buttons. One more step toward pretty pages... :-)\n* slightly simplified installation instructions\n* 2 more evil singletons taken care of at application shutdown time (see core plugin [[EvilSingletonsUnregisterer|ApplicationLifeCycleProvider]])\n* clean up [[Log4J|http://logging.apache.org/log4j/]] and [[LogBack|http://logback.qos.ch/]] NDC/MDC ~ThreadLocal at end of ~HttpRequest (prevents funny looking log files and ~OutOfMemoryExceptions on hot redeploy)\n* if the application name is not defined in {{{web.xml}}} (no {{{<display-name>}}} tag), try to fetch it from maven-provided information (in {{{META-INF/MANIFEST.MF}}})\n* corrected an object sizing bug with BEA ~JRockit 1.4. Credit to yoann35 [at] users.sourceforge.net for reporting the issue.\n* corrected a bug where messages would never be displayed if the page content-type is not in lower-case\n* session ~IDs are now correctly encoded in HTML links. Credit to Alan Moor for reporting the issue.\n* corrected a bug where page hits would not be counted when the page triggered an exception on the server\n* corrected a bug where ~WebSphere 6.0 / RAD 7 could not display the administration pages (complained about a non-existent el function). Credit to Jeremy Gaither for reporting the issue./%\n\n%/\n!Known issues\n* MessAdmin administration application does not work with BEA ~WebLogic 9.x. It has been tested, and works fine, with BEA ~WebLogic 8.1, Oracle ~OC4J 10.1.3, Tomcat 4.1 to 6.0, ~JBoss 4.0, with ~JVMs from 1.3 to 6. As a workaround, append a {{{?format=text}}} parameter to the URL.
!Additions\n* ~WebLogic 9 users, rejoice! The administration application is at last compatible with your application server! {{{?format=text}}} is now useless. Many thanks to Andy Turner for the patch./%\n\n%/\n!Improvements\n* bug fix: password-protected administration webapp works again with [[Tomcat|http://tomcat.apache.org]] 5.5.26/6.0.16\n* moved administration webapp's ~JavaScripts to bottom of page, as per [[Yahoo's Best Practices|http://developer.yahoo.com/performance/rules.html]] #6
!Additions\n* [[License|License / Contact]] change: from new BSD to Simplified BSD, which removes the final "no-endorsement" clause and is thus roughly equivalent to the MIT License. MessAdmin is even more free than before!\n* ''new core plugin: ~ResourceBrowser'', for browsing the content of your ~WebApp war and downloading key files (e.g. configuration files)!\n* ''new plugin: DiskBrowser'', for browsing the content of your filesystem!\n* ''new plugin: ScriptExecutor'', for executing Java Script live on your server!\n* ''new plugin: Log4J'', for a live view of your application logs\n* ''new plugin: [[Ehcache]]'', for some statistics on your caches\n* MessAdmin now understands the {{{X-Forwarded-For}}} HTTP header placed by most reverse proxys and load balancers, for identifying the originating IP address of a client\n* support for [[Spring Security|http://static.springsource.org/spring-security/]] 2 and 3, for getting the currently authenticated user name\n* network usage now also counts request/response headers size (previously only request/response body size was reported)\n* administration webapp: panels now keep their state (expanded/collapsed), for as long as you keep your browser window open\n* administration webapp: display application-specific temporary folder (i.e. {{{servletContext.getAttribute("javax.servlet.context.tempdir")}}})\n* administration webapp: tooltips are indicated by /%a small @@font-size:50%;font-weight:lighter;^^?^^@@%/ a @@background-color:infobackground;light background@@. Credit to Alexandre Sompheng for the idea./%\n\n%/\n!Improvements\n* added a couple of missing translations\n* corrected a possible runtime error while displaying administrative pages. Credit to Wolfgang javabreak [at] users.sourceforge.net and Sébastien Koechlin skc [at] users.sourceforge.net for reporting the issue.\n* corrected a possible ~NullPointerException at server shutdown\n* fixed a language mismatch when the browser locale is set to "en,fr". Credit to Gwyn Evans for reporting the issue.\n* when the administration application is separated from the monitored applications, the monitored application name (technically: ~ServletContext name) is now known at startup for Servlet 2.5 compliant servers (e.g. Tomcat 6); no need to wait for the first hit anymore! Thanks to Giancarlo F. Berner for reminding me of this possibility.
(Optional but highly recommended) protect the administration application.\nIf not set, anyone knowing the correct URL can access the MessAdmin administration servlet (in a stateless way)!\n\nYou have 2 options for doing this:\n* use the built-in "AuthorizationPassword" parameter of the MessAdmin administration servlet.\n* set ~J2EE security on the administration servlet. Please see your friendly user manual coming with your application server for instructions. Usually, you will have to configure your server and add the following to {{{web.xml}}}:\n{{{\n<security-constraint>\n <web-resource-collection>\n <web-resource-name>MessAdminJSPs</web-resource-name>\n <url-pattern>/MessAdmin/*</url-pattern>\n <http-method>GET</http-method>\n <http-method>POST</http-method>\n </web-resource-collection>\n <auth-constraint>\n <role-name>administrator</role-name> \n </auth-constraint>\n <user-data-constraint>\n <transport-guarantee>NONE</transport-guarantee><!-- NONE | INTEGRAL | CONFIDENTIAL -->\n </user-data-constraint>\n</security-constraint>\n\n<security-constraint>\n <web-resource-collection>\n <web-resource-name>MessAdminServlet</web-resource-name>\n <url-pattern>/messadmin</url-pattern>\n <http-method>GET</http-method>\n <http-method>POST</http-method>\n </web-resource-collection>\n <auth-constraint>\n <role-name>administrator</role-name> \n </auth-constraint>\n <user-data-constraint>\n <transport-guarantee>NONE</transport-guarantee><!-- NONE | INTEGRAL | CONFIDENTIAL -->\n </user-data-constraint>\n</security-constraint>\n\n<security-role>\n <role-name>administrator</role-name>\n</security-role>\n}}}\nTip: if using an Apache httpd server in front of your ~J2EE server, you can also map the MessAdmin administration servlet to an httpd-unknown extension mapping, so that it can only be accessed from within your organization.