<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UKoom &#187; Java</title>
	<atom:link href="http://www.ukoom.com/category/java/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ukoom.com</link>
	<description>Documentum, SharePoint, Alfresco, ECM...</description>
	<lastBuildDate>Tue, 25 Oct 2011 15:11:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Convert e.printStackTrace() to string</title>
		<link>http://www.ukoom.com/convert-e-printstacktrace-to-string.htm</link>
		<comments>http://www.ukoom.com/convert-e-printstacktrace-to-string.htm#comments</comments>
		<pubDate>Tue, 25 Oct 2011 15:11:22 +0000</pubDate>
		<dc:creator>ukoom</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=1287</guid>
		<description><![CDATA[When catching Java exceptions, we usually want to print the stack trace.  Sometimes we also want the detailed message to be used in business related logic. e.g. sending the detailed exception message by email. So we need to convert the result of e.printStackTrace() to string: private static String getStackTrace(Exception e) { StringWriter stringWriter= new StringWriter(); [...]]]></description>
			<content:encoded><![CDATA[<p>When catching Java exceptions, we usually want to print the stack trace.  Sometimes we also want the detailed message to be used in business related logic. e.g. sending the detailed exception message by email.</p>
<p>So we need to convert the result of e.printStackTrace() to string:</p>
<p>private static String<strong><em> get</em><em>StackTrace</em></strong>(Exception e) {<br />
StringWriter stringWriter= new StringWriter();<br />
PrintWriter printWriter = new PrintWriter(stringWriter);<br />
e.printStackTrace(printWriter);<br />
return stringWriter.toString();<br />
}</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/convert-e-printstacktrace-to-string.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx configuration &#8211; nginx.conf</title>
		<link>http://www.ukoom.com/nginx-configuration-nginx-conf.htm</link>
		<comments>http://www.ukoom.com/nginx-configuration-nginx-conf.htm#comments</comments>
		<pubDate>Tue, 10 Aug 2010 11:52:05 +0000</pubDate>
		<dc:creator>ukoom</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=1109</guid>
		<description><![CDATA[server { listen 80; server_name nginx.org www.nginx.org; root /data/www; location / { index index.html index.php; } location ~* \.(gif&#124;jpg&#124;png)$ { expires 30d; } location ~ \.php$ { fastcgi_pass localhost:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } nginx first searches for the most specific location given by literal strings regardless of the listed order. In the [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
<pre>server {
    listen        80;
    server_name   nginx.org  www.nginx.org;
    root          /data/www;

    location / {
        index     index.html  index.php;
    }

    location ~* \.(gif|jpg|png)$ {
        expires   30d;
    }

    location ~ \.php$ {
        fastcgi_pass   localhost:9000;
        fastcgi_param  SCRIPT_FILENAME
                       $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
}</pre>
</blockquote>
<p>nginx first searches for the most specific location given by literal strings regardless of the listed order. In the configuration above the only literal location is “<code>/</code>” and since it matches any request it will be used as a last resort. Then nginx checks locations given by regular expression in the order listed in the configuration file. The first matching expression stops the search and nginx will use this location. If no regular expression matches a request, then nginx uses the most specific literal location found earlier.</p>
<p><strong>File excerpt:</strong> <em>nginx.conf location directives</em></p>
<pre>location / { }
location /images/ { }
location /blog/ { }
location /planet/ { }
location /planet/blog/ { }

location ~ IndexPage\.php$ { }
location ~ ^/BlogPlanet(/|/index\.php)$ { }

location ~* \.(pl|cgi|perl|prl)$ { }
location ~* \.(md|mdwn|txt|mkdn)$ { }

location ^~ /images/IndexPage/ { }
location ^~ /blog/BlogPlanet/ { }

location = / { }</pre>
<p>The first five examples are &#8220;literal string&#8221; matches, and match the beginning part of the request following the host portion. In a hypothetical request for <tt><span>http://ducklington.org/</span></tt>, assuming that there is a <tt>server_name</tt> for <tt>ducklington.org</tt>, the &#8220;<tt>location /</tt>&#8221; directive will catch this request. Nginx will always fulfill a request with most specific match. A request for <tt><span>http://ducklington.org/planet/blog/</span></tt> and <tt><span>http://ducklington.org/planet/blog/about/</span></tt> will be fulfilled by the &#8220;<tt>location /planet/blog/</tt>&#8221; even though &#8220;<tt>location /planet/</tt>&#8221; also fills this request.</p>
<p>When a <tt>location</tt> directive is followed by a tilde (e.g. <tt>~</tt>) as in the fourth group of examples, nginx performs a regular expression match. These matches are always case sensitive, so in the first example requests ending in <tt>IndexPage.php</tt> would match, but <tt>indexpage.php</tt> would not. In the second the regular expression <tt><span>^/BlogPlanet(/|index\.php)$</span></tt> will match requests for <tt>/BlogPlanet/</tt> and <tt>/BlogPlanet/index.php</tt>, but <strong>not</strong> <tt>/BlogPlanet</tt>, <tt>/blogplanet/</tt>, or <tt>/blogplanet/index.php</tt>. Nginx uses Perl Compatible Regular Expressions (PCRE).</p>
<p>Using a tilde-asterisk (e.g. <tt>~*</tt>) as an argument to a <tt>location</tt> directive, as in the third group of examples, removes case sensitivity from the matches. These examples all specify how nginx should process requests that end in a particular file extension. In the first example, any file ending in: <tt>.pl</tt>, <tt>.PL</tt>, <tt>.cgi</tt>, <tt>.CGI</tt>, <tt>.perl</tt>, <tt>.Perl</tt>, <tt>.prl</tt>, and <tt>.PrL</tt> (among others) will match the request.</p>
<p>In the next group of examples, the caret-tilde argument (e.g. <tt>^~</tt>) to <tt>location</tt> functions like the literal string matches of the first group. However, when used, they force nginx to stop searching for more specific matches. So in these examples, the <tt>location</tt> directives for &#8220;<tt>^~ /images/IndexPage/</tt>&#8221; and &#8220;<tt>^~ /blog/BlogPlanet/</tt>&#8221; would be used even though the request matches another location directive. See below for more information about the order and priority of <tt>location</tt> directive processing.</p>
<p>Finally, using the equal sign (e.g. <tt>=</tt>) as an argument to <tt>location</tt> forces an exact match with the path requested and then stops searching for more specific matches. For instance, the final example will only match <tt><span>http://ducklington.org/</span></tt> but not <tt><span>http://ducklington.org/index.html</span></tt>. Using exact matches can speed up request times slightly especially when some requests are particularly popular.</p>
<p>Directives are processed in the following manner:</p>
<ul>
<li>Exact string matches are processed first. If a match is found, nginx stops searching and fulfills the request.</li>
<li>Remaining literal string directives are processed next. If the &#8220;<tt>^~</tt>&#8221; argument is used, then ngnix stops here and fulfills the request. Otherwise, nginx continues to process location directives.</li>
<li>All location directives specified by regular expressions (with the <tt>~</tt> and <tt>~*</tt> arguments) are processed. If a regular expression matches the request, nginx stops here and fulfills the request.</li>
<li>When there are no regular expressions, or no regular expressions match, the most specific literal string match is used.</li>
</ul>
<p>It is incumbent upon the administrator to ensure that possible <tt>location</tt> directives will match for every resource nginx is to provide for a given domain within the <tt>server</tt> block. Additionally, while nginx&#8217;s configuration parser is capable of reading nested location blocks, using <tt>location</tt> directives in this manner is not a supported behavior.</p>
<div id="location-configuration"><a name="location_configuration"></a></p>
<h2>Location Configuration <a href="http://library.linode.com/guniDB"><img style="border: medium none; margin: 0px; padding: 0px;" src="http://library.linode.com/images/link-icon.png" alt="Link" /></a></h2>
<p>Once nginx has selected a <tt>location</tt> to provide the resource for a given request, the response to this request is determined by the contents of the location directive block. Allow us to consider the following basic configuration block:</p>
<p><strong>File excerpt:</strong> <em>nginx.conf location directive</em></p>
<pre>location / {
    root   html;
    index  index.html index.htm;
}</pre>
<p>In this example the document root is located in the <tt>html/</tt> directory. Given the default installation prefix for nginx, the full path to this location is <tt>/opt/nginx/http/</tt>. A request for the resource located at <tt>/blog/includes/style.css</tt> and assuming no other location directives matched, would serve the resource located on the file system at <tt>/opt/nginx/html/blog/includes/style.css</tt>. If you like, you can specify absolute paths for the <tt>root</tt> directive.</p>
<p>The <tt>index</tt> directive tells nginx which resource on the file system should be used if the request does not include a file name. Therefore, in this case the request for <tt><span>http://.ducklington.org/</span></tt> would be fulfilled by the resource located at <tt>/opt/nginx/http/index.html</tt>. If multiple files are specified for the <tt>index</tt> directive, nginx will process the list in order and fulfill the request with the first file that exists. If <tt>index.html</tt> doesn&#8217;t exist in the relevant directory, <tt>index.htm</tt> would be used. If neither exist, a 404 message would be sent.</p>
<p>Allow us to consider additional examples of <tt>location</tt> directives from the <a href="http://library.linode.com/web-servers/nginx/perl-fastcgi/debian-5-lenny">serving websites with nginx and Perl-FastCGI guide</a> for a server responding for the domain <tt>ducklington.org</tt>:</p>
<p><strong>File excerpt:</strong> <em>nginx.conf location directive</em></p>
<pre>location / {
    root   /srv/www/ducklington.org/public_html;
    index  index.html index.htm;
}

location ~ \.pl$ {
    gzip off;
    include /etc/nginx/fastcgi_params;
    fastcgi_pass  127.0.0.1:8999;
    fastcgi_index index.pl;
    fastcgi_param  SCRIPT_FILENAME  /srv/www/ducklington.org/public_html$fastcgi_script_name;
}</pre>
<p>In this example, all requests for resources that end in a <tt>.pl</tt> extension are handled by the second location block, which specifies a <tt>fastcgi</tt> handler for these requests. Otherwise, nginx uses the first location directive. Resources are located on the file system at <tt>/srv/www/ducklington.org/public_html/</tt>. If no file name is specified in the request, nginx will look for and provide the <tt>index.html</tt> and <tt>index.htm</tt> files in turn. If no <tt>index</tt> files are found, the server will return a 404 error. Consider the following requests:</p>
<ul>
<li>The request for <tt><span>http://ducklington.org/</span></tt> will return the file located at <tt>/srv/www/ducklington.org/public_html/index.html</tt> if it exists. If that file doesn&#8217;t exist, it will fulfill <tt>/srv/www/ducklington.org/public_html/index.htm</tt>. If neither exists, nginx returns a 404 error.</li>
<li>The request for <tt><span>http://ducklington.org/blog/</span></tt> will return the file located at <tt>/srv/www/ducklington.org/public_html/blog/index.html</tt> if it exists. If that file doesn&#8217;t exist, it will fulfill <tt>/srv/www/ducklington.org/public_html/blog/index.htm</tt>. If neither exists, nginx returns a 404 error.</li>
<li>The request for <tt><span>http://ducklington.org/tasks.pl</span></tt> will use the FastCGI handler to execute the file located at <tt>/srv/www/ducklington.org/public_html/tasks.pl</tt> and return the result.</li>
<li>The request for <tt><span>http://ducklington.org/squire/roster.pl</span></tt> will use the FastCGI handler execute the file located at <tt>/srv/www/ducklington.org/public_html/squire/roster.pl</tt> and return the result.</li>
</ul>
</div>
<p>Reference:</p>
<p><a href="http://www.ukoom.com/wp-content/uploads/2010/08/nginx.conf.zip">nginx.conf.zip</a></p>
<p>http://nginx.org/en/docs/http/request_processing.html</p>
<p>http://library.linode.com/web-servers/nginx/configuration/basic#location_configuration</p>
<p>http://articles.slicehost.com/2009/3/5/ubuntu-intrepid-nginx-configuration</p>
<p>http://blog.rackcorp.com/?p=31</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/nginx-configuration-nginx-conf.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Resin &#8211; java.lang.NoClassDefFoundError: javax/xml/ws/WebServiceRef</title>
		<link>http://www.ukoom.com/resin-java-lang-noclassdeffounderror-javaxxmlwswebserviceref.htm</link>
		<comments>http://www.ukoom.com/resin-java-lang-noclassdeffounderror-javaxxmlwswebserviceref.htm#comments</comments>
		<pubDate>Tue, 10 Aug 2010 03:33:46 +0000</pubDate>
		<dc:creator>ukoom</dc:creator>
				<category><![CDATA[Web MVC]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=1100</guid>
		<description><![CDATA[Error -  java.lang.NoClassDefFoundError: javax/xml/ws/WebServiceRef was thrown when running my web application on myeclipse based on Resin 3.1. It is due to a MyEclipse (I am using My Eclipse 5.5.0 GA) defect. http://www.myeclipseide.com/index.php?name=PNphpBB2&#038;file=viewtopic&#038;t=21403&#038;start=0&#038;postdays=0&#038;postorder=asc&#038;highlight= Workaround:  add them under the jar files under lib folder in the boot configuration of Resin in MyEclipse. Also there is another MyEclipse [...]]]></description>
			<content:encoded><![CDATA[<p>Error -  java.lang.NoClassDefFoundError: javax/xml/ws/WebServiceRef was thrown when running my web application on myeclipse based on Resin 3.1.</p>
<p>It is due to a MyEclipse (I am using My Eclipse 5.5.0 GA) defect.</p>
<p>http://www.myeclipseide.com/index.php?name=PNphpBB2&#038;file=viewtopic&#038;t=21403&#038;start=0&#038;postdays=0&#038;postorder=asc&#038;highlight=</p>
<p>Workaround:  add them  under the jar files under lib folder in the boot configuration of Resin in MyEclipse.</p>
<p>Also there is another MyEclipse &#8216;defect&#8217;. By default, the deploy folder will be used to deploy the Eclipse Project.  But we need to update the resin.conf file to set up the correct value for &#8216;&lt;web-app-deploy path=&#8221;deploy&#8221;/&gt;&#8217; .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/resin-java-lang-noclassdeffounderror-javaxxmlwswebserviceref.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resin ArrayIndexOutOfBoundsException Tiles</title>
		<link>http://www.ukoom.com/resin-arrayindexoutofboundsexception-tiles.htm</link>
		<comments>http://www.ukoom.com/resin-arrayindexoutofboundsexception-tiles.htm#comments</comments>
		<pubDate>Tue, 10 Aug 2010 03:29:32 +0000</pubDate>
		<dc:creator>ukoom</dc:creator>
				<category><![CDATA[Web MVC]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=1101</guid>
		<description><![CDATA[There was error thrown when accessing Java web application using Tiles in Resin environment. We came across java.lang.ArrayIndexOutOfBoundsException when using Resin 4.0.8.   The root cause is a defect from Resin 4.0.8.  (http://bugs.caucho.com/view.php?id=4104) . The solution is upgrade the Resin to version 4.0.9]]></description>
			<content:encoded><![CDATA[<p>There was error thrown when accessing Java web application using Tiles in Resin environment.</p>
<p>We came across java.lang.ArrayIndexOutOfBoundsException when using Resin 4.0.8.   The root cause is a defect from Resin 4.0.8.  (http://bugs.caucho.com/view.php?id=4104) . The solution is upgrade the Resin to version 4.0.9</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/resin-arrayindexoutofboundsexception-tiles.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport</title>
		<link>http://www.ukoom.com/java-lang-noclassdeffounderror-comsunactivationregistrieslogsupport.htm</link>
		<comments>http://www.ukoom.com/java-lang-noclassdeffounderror-comsunactivationregistrieslogsupport.htm#comments</comments>
		<pubDate>Sun, 08 Aug 2010 04:17:43 +0000</pubDate>
		<dc:creator>ukoom</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=1094</guid>
		<description><![CDATA[I came across this issue when executing one unit test. From the log info, it seems that this class is not found in activation.jar.  Yes, this class is not there. But the root cause is -  the reference of javaee.jar in myeclipse.   After removing the reference to JavaEE 5 package , it works now！  Awesome!]]></description>
			<content:encoded><![CDATA[<p>I came across this issue when executing one unit test. From the log info, it seems that this class is not found in activation.jar.  Yes, this class is not there. But the root cause is -  the reference of javaee.jar in myeclipse.   After removing the reference to JavaEE 5 package , it works now！  Awesome!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/java-lang-noclassdeffounderror-comsunactivationregistrieslogsupport.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RSA DER Key generated by Java</title>
		<link>http://www.ukoom.com/rsa-der-key-generated-by-java.htm</link>
		<comments>http://www.ukoom.com/rsa-der-key-generated-by-java.htm#comments</comments>
		<pubDate>Mon, 02 Aug 2010 04:56:51 +0000</pubDate>
		<dc:creator>ukoom</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=1084</guid>
		<description><![CDATA[We can use the normal java way to generate RSA key. (for security reason, we&#8217;d better  generate 2048 bytes RSA key) But the problem is the most popular way to store RSA key is keeping them as DER format. You can get some detailed info below: http://www.cryptosys.net/pki/rsakeyformats.html Also if you want the java code to [...]]]></description>
			<content:encoded><![CDATA[<p>We can use the normal java way to generate RSA key. (for security reason, we&#8217;d better  generate 2048 bytes RSA key)</p>
<p>But the problem is the most popular way to store RSA key is keeping them as DER format.</p>
<p>You can get some detailed info below:</p>
<p>http://www.cryptosys.net/pki/rsakeyformats.html</p>
<p>Also if you want the java code to generate the RSA key in DER format and encrypt data using such keys. Please contact me. (ukoom AT gmail.com)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/rsa-der-key-generated-by-java.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse SVN Error</title>
		<link>http://www.ukoom.com/eclipse-svn-error.htm</link>
		<comments>http://www.ukoom.com/eclipse-svn-error.htm#comments</comments>
		<pubDate>Wed, 05 May 2010 12:41:58 +0000</pubDate>
		<dc:creator>ukoom</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=1069</guid>
		<description><![CDATA[Error message: commit -m &#8220;commit message.&#8221; files RA layer request failed svn: Commit failed (details follow): svn: PROPFIND request failed on &#8216;/repo/path/!svn/vcc/default&#8217; svn: PROPFIND of &#8216;/repo/path/!svn/vcc/default&#8217;: Could not read status line: connection was closed by server. (http://example.com) How to fix? Looking at my SVN configurations I could only find the JavaHL option, no SVNKit available.]]></description>
			<content:encoded><![CDATA[<p>Error message:</p>
<blockquote><p>commit -m &#8220;commit message.&#8221; files<br />
RA layer request failed<br />
svn: Commit failed (details follow):<br />
svn: PROPFIND request failed on &#8216;/repo/path/!svn/vcc/default&#8217;<br />
svn: PROPFIND of &#8216;/repo/path/!svn/vcc/default&#8217;: Could not read status  line: connection was closed by server. (http://example.com)</p>
<p>How to fix?</p>
<p>Looking at my SVN configurations I could only find the JavaHL option, no  SVNKit available.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/eclipse-svn-error.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Apache Tomcat 5.5 and IIS 6.0 with JK</title>
		<link>http://www.ukoom.com/install-apache-tomcat-5-5-and-iis-6-0-with-jk.htm</link>
		<comments>http://www.ukoom.com/install-apache-tomcat-5-5-and-iis-6-0-with-jk.htm#comments</comments>
		<pubDate>Tue, 23 Mar 2010 07:57:27 +0000</pubDate>
		<dc:creator>ukoom</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=1053</guid>
		<description><![CDATA[System Requirements For this installation I used the following: Windows Server 2003 Enterprise Edition Internet Information Services (IIS) 6.0 Sun Java Runtime JRE 5.0 Update 2 Apache Jakarta Tomcat version 5.5.9 The JK Tomcat Web Server Connectors 1. Install the JDK and Tomcat and set the environment variable. 2. Configure JK Download JK from http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.14/isapi_redirect-1.2.14.exe [...]]]></description>
			<content:encoded><![CDATA[<p>System Requirements<br />
For this installation I used the following:<br />
Windows Server 2003 Enterprise Edition<br />
Internet Information Services (IIS) 6.0<br />
Sun Java Runtime JRE 5.0 Update 2<br />
Apache Jakarta Tomcat version 5.5.9<br />
The JK Tomcat Web Server Connectors</p>
<p>1.	Install the JDK and Tomcat and set the environment variable.<br />
2.	Configure JK<br />
Download JK from http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.14/isapi_redirect-1.2.14.exe<br />
Setup the file. (It’s better that there isn’t blank space in the directory which you choose to install.)<br />
After installing it, you could find the file “workers.properties.minimal” in \Apache Software Foundation\Jakarta Isapi Redirector, and change its name to “workers.properties”.<br />
Open the Registry Editor; Open the “HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0]”<br />
Change the value “workers.properties.minimal”of worker_file to “workers.properties”<br />
The content of worker.properties and uriworkermap.properties is follow:<br />
worker.properties:<br />
	worker.list=ajp13<br />
	worker.ajp13.type=ajp13<br />
	worker.ajp13.host=localhost<br />
	worker.ajp13.port=8009<br />
uriworkermap.properties:<br />
	# Mapping the URI /admin, /manager, /jsp-examples and /servlets-examples and<br />
	# everything under them to Tomcat<br />
	# /admin/*=ajp3<br />
	# /manager/*=ajp13<br />
	# /jsp-examples/*=ajp13<br />
	# /servlets-examples/*=ajp13</p>
<p>	# Mapping all URI which end with a common suffix .jsp and .do to Tomcat<br />
	# /*.jsp=ajp13<br />
	# /*.do=ajp13</p>
<p>	# Mapping all URI to Tomcat<br />
	/*=ajp13</p>
<p>3.	Create a new website in IIS which point to your website (such as $CATALINA_HOME\ webapps\ROOT)<br />
4.	Configure the Tomcat ISAPI Filter<br />
Rigth click your websitePropertiesISAPI FiltersAddset Filter name “jakarta” and Executable choose the path of “isapi_redirector.dll”OK<br />
Note &#8211; If you check on its status, you may notice that the ISAPI filter hasn’t been successfully loaded at this stage, even if you have re-started IIS. This is expected behaviour and is documented in the IIS6 Operations Guide,<br />
“In an effort to optimize resources in IIS 6.0, an ISAPI filter is not loaded until a request is made to a Web site that requires the ISAPI filter. Until this request is made, IIS Manager does not display the status of the ISAPI filter.”</p>
<p>http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/93f23233-2a47-4104-b0b4-a7ec0d3116f3.mspx</p>
<p>However, once IIS has served a successful request to it you will see the status of the ISAPI filter change to ‘Loaded’.<br />
5.	Create a virtual directory for the Tomcat connector to use, create a new Web Service Extension in IIS and then enable that web service extension so that it can be used.<br />
Rigth click your websiteNewVirtual Directoryset Alias: jakartaNextset Path: choose the path of “isapi_redirector.dll”.<br />
6.	Create and exable the tomcat Web Service Extension<br />
Rigth click “Web Service Extension”  Add a new Web service extension Set name: Tomcat, set Required files:choose your “isapi_redirector.dll” click the “Set extension status to Allowed”OK<br />
7.	Add the “.jsp”<br />
Rigth click your websitePropertiesHome DirectoryMappingsAddset Executable: choose your “isapi_redirector.dll”, set Extension:  .jsp (Note: if there is blank space in your path, you need to make your path in Double quotes.)<br />
8.	Set index.jsp as default content page<br />
Rigth click your websitePropertiesDocumentAdd&#8211;&gt;index.jsp<br />
10. Restart tomcat and IIS. You should now be ready to test your Tomcat installation by issuing a request to the sample applications. Visit http://localhost<br />
If show the page as http://localhost:8080, you’re successful.</p>
<p>tomcat5.5 整合 iis6.0<br />
环境：Windows 2003 R2 + IIS 6.0 + JDK 1.5+TOMCAT5.5<br />
1. 安装tomcat</p>
<p>2. 下载jkhttp://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.14/isapi_redirect-1.2.14.exe<br />
安装的好处就是配置文件都有了。只需做少许修改：<br />
安装目录可以随意（最好让目录不带空格），安装完成后在conf里就是它的配置文件，安装完后找到目录文件\Apache Software Foundation\Jakarta Isapi Redirector 这个可以根据你自己的改动，在conf文件里把workers.properties.minimal它改为<br />
workers.properties，对应找到注册表里的<br />
HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0] 中的worker_file 点右键修改<br />
同样去掉workers.properties.minimal 后的minimal。</p>
<p>3. 以下为两个文件的内容<br />
	uriworkermap.properties:</p>
<p>	# Mapping the URI /admin, /manager, /jsp-examples and /servlets-examples and<br />
	# everything under them to Tomcat<br />
	# /admin/*=ajp3<br />
	# /manager/*=ajp13<br />
	# /jsp-examples/*=ajp13<br />
	# /servlets-examples/*=ajp13</p>
<p>	# Mapping all URI which end with a common suffix .jsp and .do to Tomcat<br />
	# /*.jsp=ajp13<br />
	# /*.do=ajp13</p>
<p>	# Mapping all URI to Tomcat<br />
	 /*=ajp13</p>
<p>	worker.properties:</p>
<p>	worker.list=ajp13<br />
	worker.ajp13.type=ajp13<br />
	worker.ajp13.host=localhost<br />
	worker.ajp13.port=8009</p>
<p>4. 在iis里新建一个站点，指向网站所在的目录（比如$CATALINA_HOME\webapps\ROOT），然后在站点上点右键选“属性”，在弹出的页框里选择“ISAPI筛选器”，点“添加”，筛选器名称填jakarta,可执行文件中填入你的isapi_redirector.dll的绝对路径。“确定”后点“确定”关闭属性页。再在“默认网站”上右键，选择“新建”－&gt;“虚拟目录”，别名填jakarta，下一步，路径选为你的isapi_redirector.dll存放的目录。</p>
<p>5. 在“Internet信息服务管理器”的“网站”中的“Web服务扩展”上点右键选择“添加一个新的Web服务扩展”，弹出的框中扩展名填Tomcat(其实无所谓的)，“要求的文件”选“添加”然后找到你的isapi_redirector.dll后“确定”。“设置扩展状态为允许”也打上勾，确定。</p>
<p>6. 如果要让iis能读取index.jsp这样的jsp默认首页，还需要在IIS6.0右键单击【默认网站】，选择【属性】，单击【主目录】选项卡中的【配置】，单击【映射】选项卡，单击【添加】，将isapi_redirector.dll的全路径写进去，扩展名要写.jsp（注意：如果你的路径包含空格，那么你需要将这个完整路径用英文的双引号括起来才能添加）。<br />
到这里就配置完了</p>
<p>7. 重起tomcat 重启iis 去掉端口后看看能运行了吧</p>
<p>总结：<br />
    说到底，这就是两种服务的一种集成，使之外部看起来像一种服务，可以这么理解：<br />
外部访问域名－－＞解析后到IP－－＞IIS查找相应站点－－＞发现jsp文件－－＞转至jk连接处理－－＞将相应文件解释转给Tomcat－－＞将页面返回给IIS－－＞展现给客户端。<br />
那么哪出了问题，就查哪，一步一步来，一定能成功的，希望对大家有所帮助，另外多看官方手册，多想其中的原理，网上流传的各种文档不一定就是正确的，包括本文，只是尽量详尽的给一种引导。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/install-apache-tomcat-5-5-and-iis-6-0-with-jk.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modifying JBoss for Enhanced Performance</title>
		<link>http://www.ukoom.com/modifying-jboss-for-enhanced-performance.htm</link>
		<comments>http://www.ukoom.com/modifying-jboss-for-enhanced-performance.htm#comments</comments>
		<pubDate>Fri, 26 Feb 2010 08:37:53 +0000</pubDate>
		<dc:creator>ukoom</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=1048</guid>
		<description><![CDATA[The following procedure is recommended for enhancing the overall IBM Cognos Now! network performance. Note: This procedure requires restarting the JBoss application server. Steps In the \server\default\deploy\jbossweb-tomcat50.sar directory, locate and open the server.xml file. Locate the block listed under the &#60;!&#8211; A HTTP/1.1 Connector on port 8080 &#8211;&#62; heading. Note: The specific port number and [...]]]></description>
			<content:encoded><![CDATA[<p><a name="58508">The following procedure is recommended  for enhancing the overall IBM Cognos Now! network performance.</a></p>
<p><a name="58508"><strong>Note: </strong>This procedure requires restarting  the JBoss application server.</a></p>
<h5><a name="58508">Steps</a></h5>
<ol>
<li><a name="58508">In the  \server\default\deploy\jbossweb-tomcat50.sar directory, locate and open the server.xml file.</a></li>
<li><a name="58508">Locate the block listed under the <strong>&lt;!&#8211; A  HTTP/1.1 Connector on port 8080 &#8211;&gt;</strong> heading.</a>
<p><a name="58508"><strong>Note: </strong>The specific port number and other  settings may vary.</a></p>
<p><a name="58508">This block should look like  this:</a></p>
<pre><a name="58508">&lt;!-- A HTTP/1.1 Connector on port 8080 --&gt;</a></pre>
<pre><a name="58508">&lt;Connector port="8080" address="${jboss.bind.address}"</a></pre>
<pre><a name="58508">maxThreads="400" minSpareThreads="100" maxSpareThreads="75"</a></pre>
<pre><a name="58508">enableLookups="false" redirectPort="8443" acceptCount="100"</a></pre>
<pre><a name="58508">connectionTimeout="20000" disableUploadTimeout="true"/&gt;</a></pre>
</li>
<li><a name="58508">Add the following parameters:</a>
<pre><a name="58508">compression="on" </a></pre>
<pre><a name="58508">socketBuffer="1045576" /&gt;</a></pre>
</li>
<li><a name="58508">Save and close the server.xml file.</a></li>
<li><a name="58508">Restart JBoss.</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/modifying-jboss-for-enhanced-performance.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerDesigner Reverse Engineer</title>
		<link>http://www.ukoom.com/powerdesigner-reverse-engineer.htm</link>
		<comments>http://www.ukoom.com/powerdesigner-reverse-engineer.htm#comments</comments>
		<pubDate>Fri, 05 Feb 2010 05:34:06 +0000</pubDate>
		<dc:creator>ukoom</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=1040</guid>
		<description><![CDATA[Get the Physical Data Model 1. Menu Operation File, Reverse Engineer , Database, New Phycial Data Model 2. Connection Add a connect to the target database 3. Choose tables to generate the models Generate the Java Code 1. Menu Operation Tools , Generate Object-Oriented Model, Detail, O/R Mapping, Enable Transformations, Extended Model Definitions, O/R Mapping,      [...]]]></description>
			<content:encoded><![CDATA[<p>Get the Physical Data Model<br />
1. Menu Operation<br />
File, Reverse Engineer , Database, New Phycial Data Model<br />
2. Connection<br />
Add a connect to the target database<br />
3. Choose tables to generate the models</p>
<p>Generate the Java Code<br />
1. Menu Operation<br />
Tools , Generate Object-Oriented Model, Detail, O/R Mapping,<br />
Enable Transformations, Extended Model Definitions, O/R Mapping,      Hibernate</p>
<p>To be continued.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/powerdesigner-reverse-engineer.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

