« Web Services 関連3仕様の公開について (W3C 勧告) | Main | 3割 国内企業のITアウトソーシング利用率 »

26 January 2005

Windows版Tomcat5.5.4の挙動

Windows版のTomcat5.5.4において、CATALINA_HOME/bin/Tomcat5.exeとTomcat5W.exeで挙動が異なることが分かったので、メモ。あるWebアプリを試していて、動作が違うことに気がついたので、次のJSPを実行してみた。


<%
out.print("<dl>");
java.util.Properties info = System.getProperties();
for (java.util.Enumeration e = info.keys(); e.hasMoreElements(); ) {
String key = (String)e.nextElement();
out.print("<dt>");
out.print(key);
out.print("</dt>");
out.print("<dd>");
out.println(info.getProperty(key));
out.print("</dd>");
}
out.print("");
%>

そしたら、Tomcat5.exeとTomcat5W.exeで次のような違いが出た。

user.dir


Tomcat5=C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin
Tomcat5W=C:\WINNT\system32

user.home


Tomcat5=C:\Documents and Settings\Administrator
Tomcat5W=C:\Documents and Settings\Default User

user.name


Tomcat5= Administrator
Tomcat5W=SYSTEM

java.library.path

user.nameが異なるので、Tomcat5Wはシステムの環境変数しかもってきていない。


もしかするとどこかのドキュメントに記載されているのかもしれませんが、この違いは単に実行ファイルの動く場所に依存しているということなのでしょうね。しかし「Tomcat5.exeもTomcat5W.exeもどちらも同じ動きをして、単にユーザインターフェースだけの違いだ」と思っていると痛い思いをしそうです。


追記
The Apache Jakarta Tomcat 5.5 Servlet/JSP Container - Windows service HOW-TO
この中で、


Tomcat5 service application
Tomcat5 is a service application for running Tomcat5 as NT service.
Tomcat5w monitor application
Tomcat5w is a GUI application for monitoring and configuring Tomcat services.
という記述があります。Tomcat5.exeはWindowsサービスのアプリで、Tomcat5w.exeはモニタリングと設定のためのGUIツールなわけですね。位置付けが異なるので動作が違うといえばその通りですね。
教訓:exeファイルを直接叩かずに、サービスとしてインストールして、サービスを利用しよう。

TrackBack

TrackBack URL for this entry:
http://bb.lekumo.jp/t/trackback/517129/31023867

Listed below are links to weblogs that reference Windows版Tomcat5.5.4の挙動:

Comments

I am really loving the theme/design of your site. Do you ever run into any browser compatibility issues? A couple of my blog visitors have complained about my blog not operating correctly in Explorer but looks great in Chrome. Do you have any recommendations to help fix this problem?

I love what you guys are up too. This type of clever work and exposure! Keep up the very good works guys I've incorporated you guys to our blogroll.

Hurrah, that's what I was seeking for, what a stuff! present here at this website, thanks admin of this web page.

naturally like your website but you need to take a look at the spelling on quite a few of your posts. Several of them are rife with spelling issues and I find it very bothersome to tell the reality on the other hand I will certainly come again again.

Appreciation to my father who told me on the topic of this web site, this website is in fact awesome.

Nice post. I learn something totally new and challenging on websites I stumbleupon on a daily basis. It's always exciting to read through content from other writers and practice something from their sites.

naturally like your web-site but you need to check the spelling on several of your posts. Several of them are rife with spelling issues and I to find it very bothersome to tell the reality on the other hand I will definitely come back again.

I really like reading through an article that can make men and women think. Also, many thanks for allowing me to comment!

Post a comment

Access Ranking

Powered by Six Apart
Sponsored links