Notes by nogeek
Displaying keyword search results 1 - 10
Created by nogeek on March 13, 2012 11:53:49
Last update: March 13, 2012 11:53:49
A. To configure Apache httpd to proxy Tomcat using HTTP: Load Apache httpd modules ( httpd.conf ):
LoadModule proxy_module /usr/lib/apache2/modules/m... Configure Apache httpd proxy: <VirtualHost *:80> ServerAdmin webmaster@my... Configure Tomcat HTTP connector with appropriate proxyName and proxyPort : <Connector port="8080" protocol="HTTP/1.1"... Note: context path must be the same for httpd and Tomcat. B. To configure Apache httpd to proxy Tomcat using AJP: Load Apache httpd modules ( httpd.conf ): LoadModule proxy_module /usr/lib/apache2/modules/m... Configure Apache httpd proxy: <VirtualHost *:80> ServerAdmin webmaster@my... Configure Tomcat AJP connector: <Connector port="8009" protocol="AJP/1.3" redirect... You can try this if context path must be changed between Tomcat and httpd: <VirtualHost *:80> ServerAdmin webmaster@my... But this may not work in case the servlet context path is written in the HTML content. ProxyPassReverse only...
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 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 March 21, 2011 15:31:26
Last update: March 21, 2011 15:32:35
Inventory list for configuring a JDBC data source in JBoss:
Put *-ds.xml configuration file in server/yourServer/deploy , e.g., hsqldb-ds.xml
Other needed files in server/yourServer/deploy : jboss-local-jdbc.rar , jboss-xa-jdbc.rar , jca-jboss-beans.xml , transaction-jboss-beans.xml
Copy jboss-jca.deployer directory to server/yourServer/deployers
Copy standardjbosscmp-jdbc.xml to server/yourServer/conf
Make sure the following lines appear in server/yourServer/conf/jboss-service.xml
<mbean code="org.jboss.ejb.plugins.cmp.jdbc.metada...
Created by nogeek on February 08, 2011 13:50:32
Last update: February 08, 2011 13:50:32
I have a template that applies equally for two kinds of nodes (apples and oranges). This is the select to apply same rule to both.
<xsl:apply-templates select="apple|orange">
...
Created by nogeek on February 03, 2011 13:08:38
Last update: February 03, 2011 13:14:10
The log line was like this:
2011-01-19 15:16:34,842 INFO [STDOUT] (HDScanne... Note that INFO and timestamp were printed twice. Based on my configuration, I was expecting something like this: 2011-01-19 15:16:34,842 INFO [XmlWebApplicationC... i.e., the logger name should have been XmlWebApplicationContext , not STDOUT ! What was the problem? I found this error message in server.log : 2011-01-19 14:34:38,107 ERROR [STDERR] (main) lo... It turned out that org.apache.log4j.Appender was loaded by my web application class loader, whereas org.jboss.logging.appender.FileAppender was loaded by the JBoss bootstrap class loader. Removing the log4j jar from my web application archive fixed the problem (sine log4j is already available in JBoss). Why was the logger changed to STDOUT? JBoss detects that there's a problem with the log4j configuration and routes all...
Created by nogeek on December 31, 2010 13:02:23
Last update: December 31, 2010 13:03:27
The JBoss Microcontainer provides three StructureDeployer implementations out-of-the-box, with relativeOrder values defined for each:
DeclaredStructure: relativeOrder 0
JARStructure: relativeOrder 10000
FileStructure: relativeOrder Integer.MAX_VALUE
At deployment time, the StructureDeployer with lower relativeOrder will be consulted first to determine the structure of a deployment. This means that DeclaredStructure is always called first followed by JARStructure and finally FileStructure .
DeclaredStructure allows you to specify the structure of a deployment, including any nested deployments, using an XML file named jboss-structure.xml placed in the deployment's META-INF directory. For example, the following is jboss-structure.xml for jbossweb.sar , the JBoss Tomcat service:
<?xml version="1.0" encoding="UTF-8"?>
<structu...
Created by nogeek on December 31, 2010 12:41:05
Last update: December 31, 2010 12:41:05
The JBoss JARStructure class determines whether a deployment, in the form of a file or a directory, represents a packaged or unpackaged JAR archive. If the deployment is a single file then the filename suffix is checked against the following list. If the deployment is a directory then the same check is performed using the directory name. If a match is found in either case, then the deployment is considered a JAR archive. A top level directory is always considered an unpackaged JAR archive, even when the suffix does not match. .zip - a standard archive .jar - a java archive (defined by the Java SE specification) .ear - an enterprise archive (defined by the Java EE specification) .rar - a resource archive (defined by...
Created by nogeek on December 31, 2010 12:30:37
Last update: December 31, 2010 12:30:37
JBoss deployment descriptors are files containing configuration information for deployments. They are detected using the FileStructure class by matching the file suffix or using a FileMatcher . Default file suffixes include:
-beans.xml - contains bean definitions
-aop.xml - contains aspect definitions
-service.xml - contains mbean definitions
-ds.xml - contains JCA datasource definitions
These are defined in $JBOSS_HOME/server/default/conf/bootstrap/deployers.xml :
<!-- File Structure -->
<bean name="FileStr...
Created by nogeek on December 31, 2010 11:56:25
Last update: December 31, 2010 11:56:25
These are the steps to create a JBoss 5.1.0 configuration with Tomcat from the built-in minimal configuration. Change directory to $JBOSS_HOME/server . Make a copy of the minimal configuration.
cp -R minimal tomcatonly Copy bindingservice.beans from the default configuration. cp -R default/conf/bindingservice.beans tomcatonly... Copy login-config.xml from the default configuration. cp default/conf/login-config.xml tomcatonly/conf/ Edit tomcatonly/conf/jboss-service.xml : Add jars from the common/lib directory: <!-- Load all jars from the JBOSS_DIST/serv... Add the JAAS security manager section (copy from the default profile, and yes, JBoss tomcat can't live without the JBoss JAAS manager). <!-- JAAS security manager and realm mappin... Copy the Tomcat (JBoss web) deployer from the default configuration. cp -R default/deployers/jbossweb.deployer tomcaton... Copy metadata-deployer-jboss-beans.xml and security-deployer-jboss-beans.xml from the default profile. cp default/deployers/metadata-deployer-jboss-b... Copy...