Notes by nogeek

Displaying notes 1 - 10
Created by nogeek on December 30, 2011 13:25:28    Last update: December 30, 2011 13:57:37
By default, tomcat uses an enhanced java.util.logging implementation called JULI, which can be configured at two different levels: Globally, with the ${catalina.base}/conf/logging.properties file. Per web application, with WEB-INF/classes/logging.properties . The configuration file is a normal Java properties file: Logging handlers are specified with the handlers property. handlers = 1catalina.org.apache.juli.FileHandler, ... The root logger can define its set of handlers using the .handlers property. .handlers = 1catalina.org.apache.juli.FileHandler,... A prefix may be added to handler names. The prefix starts with a digit and ends with a dot ( . ), for example: # 1catalina. is a prefix 1catalina.org.apache.j... System property replacement is performed for property values which contain ${systemPropertyName} . Each handler can have its own specific properties: 3manager.org.apache.juli.FileHandler.level = FINE ... Loggers can define their own...
Created by nogeek on December 30, 2011 13:54:04    Last update: December 30, 2011 13:54:04
Tomcat 7.0 failed with a SEVERE error without printing a stack trace: Dec 30, 2011 1:21:09 PM org.apache.catalina.core.S... Now it's hard to figure out what's wrong without knowing where things went wrong. Why is Tomcat not logging anything? Tomcat logging is configured by class loader. Logging behaves differently depending on which class loader loaded the logger. You'll need to look at both $CATALINA_BASE/conf/logging.properties and WEB-INF/classes/logging.properties to figure out why the stack trace is not logged. In my case, the web app specific WEB-INF/classes/logging.properties overshadowed the system $CATALINA_BASE/conf/logging.properties and suppressed the stack trace.
Created by nogeek on December 29, 2011 13:31:44    Last update: December 29, 2011 14:29:13
Tomcat allows you to create multiple server instances for the same installation. The installation directory is identified as CATALINA_HOME , the instance directory is identified as CATALINA_BASE . Here are the steps: Create a base directory for the new instance, for example: /home/nogeek/tomcat1 . Create the subdirectories: mkdir -p /home/nogeek/tomcat/{bin,conf,logs,temp,w... Copy web.xml from the installation directory: cp $CATALINA_HOME/conf/web.xml /home/nogeek/tomcat... Copy logging.properties from the installation directory: cp $CATALINA_HOME/conf/logging.properties /home/no... Create server.xml under tomcat1/conf : <?xml version='1.0' encoding='utf-8'?> <Server ... Create script setenv.sh under tomcat1/bin : # Edit this file to set custom options # Tomcat... Copy startup.sh and shutdown.sh from the installation directory. Add the following two lines to the beginning of each: CATALINA_BASE=/home/nogeek/tomcat1 export CATAL... Create a soft link for catalina.sh in tomcat1/bin : $ ln -s ~/apache-tomcat-7.0.22/bin/catalina.sh cat...
Created by nogeek on November 27, 2011 12:24:27    Last update: November 27, 2011 12:24:27
There is no XSLT 2.0 support in the JDK as of 7.0. According to Stackoverflow , there are three Java packages that support XSLT 2.0: Saxon IBM WebSphere XML Feature Pack Oracle XDK There are no known support for XSLT in browsers. According to Wikipedia : XSLT is developed by the World Wide Web Consortium (W3C). The most recent version is XSLT 2.0, which reached W3C recommendation status on 23 January 2007. As of 2010, however, XSLT 1.0 is still widely used, as there are no products that support XSLT 2.0 running in the browser, nor on some important server environments such as LAMP. Expressions like this: format-date(xs:date('1999-12-31'), '[D01] [MNn] ... where format-date is a XSLT 2.0 function and date is a XPath 2.0 constructor...
Created by nogeek on November 03, 2010 20:52:49    Last update: November 23, 2011 08:54:44
My problem is simple: in my XML data, a timestamp is provided as a long integer (number of milliseconds since the "the epoch"). When I do XSLT, I want to display it as a readable string, such as "Mon Nov 01 18:08:48 CDT 2010". After hours of struggle, I found: It's not so easy to get the job done with JDK 1.6 There are tons of garbage on the web in this space (suggestions, code snippets that simply don't work) Simple Xalan extension functions was the only resource that's somewhat informative. Even there some of the examples don't work. Below is a list of what worked and what didn't. This works: <xsl:stylesheet version="1.0" xmlns:xsl="h... This does not (providing long value to Date constructor): <xsl:stylesheet version="1.0" xmlns:xsl="h......
Created by nogeek on November 17, 2011 14:30:28    Last update: November 17, 2011 14:30:28
CATALINA_HOME is the root directory where Tomcat is installed. CATALINA_BASE is the same as CATALINA_HOME for single instance Tomcat configuration. For multiple instance configurations CATALINA_BASE is the root of that instance. The startup script prints out the values of CATALINA_HOME and CATALINA_BASE at startup: Using CATALINA_BASE: "C:\Apps\tomcat-7.0.22" ...
Created by nogeek on November 16, 2011 20:47:33    Last update: November 16, 2011 20:47:33
VMWare Tools must be installed in the guest OS for shared folders to work. Configure the shared folder: Virtual Machine -> Virtual Machine Settings -> Options -> Shared Folders . Click the Add button to add a share. The share maps a host path to a name in the guest. If the guest system is Linux, the shared folder is available under /mnt/hgfs . If the guest system is Windows, the shared folder is available as \\.host\Shared Folders\<share_name>
Created by nogeek on November 16, 2011 10:16:15    Last update: November 16, 2011 10:16:15
Bring up the Control Panel system page (shortcut: Win+Pause, Win+Fn+Insert/Pause for laptop): Click "Remote settings" on the left Check "Remote Desktop" -> "Allow connection..."
Created by nogeek on July 01, 2011 09:37:59    Last update: July 01, 2011 09:39:04
Use the key combination " ALT+HOME " to go to the home page for your browser. This works in Internet Explorer, Firefox and Chrome. Much faster than clicking the "Home" button.
Created by nogeek on April 21, 2011 20:38:31    Last update: April 21, 2011 20:39:07
Bring up the "System Properties" dialog (Start -> My Computer -> Right Click -> select Properties ) Click on the Remote tab. Check the box labeled "Allow users to connect remotely to this computer".
Previous  1 2 3 4 5 Next