﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-javaGrowing-文章分类-好文收藏</title><link>http://www.blogjava.net/juhongtao/category/3201.html</link><description /><language>zh-cn</language><lastBuildDate>Wed, 28 Feb 2007 03:39:41 GMT</lastBuildDate><pubDate>Wed, 28 Feb 2007 03:39:41 GMT</pubDate><ttl>60</ttl><item><title>Tomcat全攻略</title><link>http://www.blogjava.net/juhongtao/articles/25578.html</link><dc:creator>javaGrowing</dc:creator><author>javaGrowing</author><pubDate>Tue, 27 Dec 2005 07:31:00 GMT</pubDate><guid>http://www.blogjava.net/juhongtao/articles/25578.html</guid><wfw:comment>http://www.blogjava.net/juhongtao/comments/25578.html</wfw:comment><comments>http://www.blogjava.net/juhongtao/articles/25578.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/juhongtao/comments/commentRss/25578.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/juhongtao/services/trackbacks/25578.html</trackback:ping><description><![CDATA[<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr valign="top"><td><span class="atitle">Tomcat全攻略</span></td>
    <td width="8"><img alt="" src="http://www.huihoo.org/apache/tomcat/l-tomcat.files/c.gif" border="0" height="1" width="8"></td>
    <td><br></td>
    <td width="6"><img alt="" src="http://www.huihoo.org/apache/tomcat/l-tomcat.files/c.gif" border="0" height="1" width="6"></td></tr><!-- Black line separator -->
  <tr valign="top">
    <td colspan="5" bgcolor="#000000"><img alt="" src="http://www.huihoo.org/apache/tomcat/l-tomcat.files/c.gif" border="0" height="1" width="100"></td></tr>
  <tr valign="top">
    <td colspan="5" bgcolor="#ffffff"><img alt="" src="http://www.huihoo.org/apache/tomcat/l-tomcat.files/c.gif" border="0" height="8" width="100"></td></tr></tbody></table><!-- END HEADER AREA --><!-- START BODY AREA -->

  
  
    <table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr valign="top"><td width="10"><img alt="" src="http://www.huihoo.org/apache/tomcat/l-tomcat.files/c.gif" border="0" height="1" width="10"></td>
    <td width="100%">
      <table align="right" border="0" cellpadding="0" cellspacing="0" width="168">
        <tbody>
        <tr><!-- Sidebar Gutter -->
          <td width="8"><img alt="" src="http://www.huihoo.org/apache/tomcat/l-tomcat.files/c.gif" height="21" width="5"></td>
          <td width="160"><!-- Start TOC -->
            <table border="0" cellpadding="0" cellspacing="0" width="160">
              <tbody>
              <tr>
                <td bgcolor="#000000" height="1" width="160"><img alt="" src="http://www.huihoo.org/apache/tomcat/l-tomcat.files/c.gif" height="1" width="160"></td></tr>
              <tr>
                <td align="center" background="l-tomcat.files/bg-gold.gif" height="5"><b>内容：</b></td></tr>
              <tr>
                <td bgcolor="#666666" height="1" width="160"><img alt="" src="http://www.huihoo.org/apache/tomcat/l-tomcat.files/c.gif" height="1" width="160"></td></tr>
              <tr>
                <td align="right">
                  <table border="0" cellpadding="3" cellspacing="0" width="98%">
                    <tbody>
                    <tr>
                      <td><a href="http://www-900.ibm.com/developerWorks/cn/java/l-tomcat/index.shtml#1">一：简介</a></td></tr>
                    <tr>
                      <td><a href="http://www-900.ibm.com/developerWorks/cn/java/l-tomcat/index.shtml#2">二：安装及配置</a></td></tr>
                    <tr>
                      <td><a href="http://www-900.ibm.com/developerWorks/cn/java/l-tomcat/index.shtml#3">三：应用</a></td></tr>
                    <tr>
                      <td><a href="http://www-900.ibm.com/developerWorks/cn/java/l-tomcat/index.shtml#4">四：综述</a></td></tr>
                    <tr>
                      <td><a href="http://www-900.ibm.com/developerWorks/cn/java/l-tomcat/index.shtml#resources">参考资料</a></td></tr>
                    <tr>
                      <td><a href="http://www-900.ibm.com/developerWorks/cn/java/l-tomcat/index.shtml#author1">关于作者</a></td></tr></tbody></table></td></tr></tbody></table><!-- End TOC --><!-- Start Related Content Area ==
        <table width="160" border="0" cellspacing="0" cellpadding="0">
        <tr><td bgcolor="#000000" height="1" width="160"><img src="/developerWorks/cn/i/c.gif" width="160" height="1" alt=""/></td></tr>
        <tr><td height="5" background="/developerWorks/cn/i/bg-gold.gif" align="center"><b>相关内容：</b></td></tr>
        <tr><td bgcolor="#666666" height="1" width="160"><img src="/developerWorks/cn/i/c.gif" width="160" height="1" alt=""/></td></tr>
        <tr><td align=right>
            <table width="98%" border="0" cellspacing="0" cellpadding="3">
            <tr><td><a href=#1>TCP/IP 介绍</a></td></tr>
            <tr><td><a href=#1>TCP/IP 介绍</a></td></tr>
            </table>
        </td></tr></table>
!== End Related dW Content Area -->
            <table border="0" cellpadding="0" cellspacing="0" width="160">
              <tbody>
              <tr>
                <td colspan="2" bgcolor="#000000" height="2" width="150"><img alt="" src="http://www.huihoo.org/apache/tomcat/l-tomcat.files/c.gif" height="2" width="160"></td></tr>
              <tr>
                <td colspan="2" bgcolor="#ffffff" height="2" width="150"><img alt="" src="http://www.huihoo.org/apache/tomcat/l-tomcat.files/c.gif" height="2" width="160"></td></tr></tbody></table><!-- END STANDARD SIDEBAR AREA --></td></tr></tbody></table>
      <p><a href="http://www-900.ibm.com/developerWorks/cn/java/l-tomcat/index.shtml#author1">宗 
      锋</a><br>西北大学计算机系硕士<br>2001 年 12 月</p>
      <blockquote>随着java的流行，其在web上的应用也越来越广，tomcat作为一个开源的servlet容器，应用前景越来越广，本文将向你讲述tomcat的一些知识。</blockquote>
      <p><a id="1" name="1"><span class="atitle2">一：简介</span></a><br>tomcat
是jakarta项目中的一个重要的子项目，其被JavaWorld杂志的编辑选为2001年度最具创新的java产品(Most
Innovative Java
Product)，同时它又是sun公司官方推荐的servlet和jsp容器(具体可以见http:
//java.sun.com/products/jsp/tomcat/)，因此其越来越多的受到软件公司和开发人员的喜爱。servlet和jsp的
最新规范都可以在tomcat的新版本中得到实现。</p>
      <p><a id="2" name="2"><span class="atitle2">二：安装及配置</span></a><br>tomcat最新版本为4.0.1，这个版本用了一个新的servlet容器Catalina，完整的实现了servlet2.3和jsp1.2规范。注意安装之前你的系统必须安装了jdk1.2以上版本。</p>
      <p><span class="atitle3">(一)：安装</span><br>1：windows平台<br>从tomcat网站下载<a href="http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.1/bin/jakarta-tomcat-4.0.1.exe" target="_blank">jakarta-tomcat-4.0.1.exe</a>，按照一般的windows程序安装步骤即可安装好tomcat,安装时它会自动寻找你的jdk和jre的位置。</p>
      <p>2：linux平台<br>下载<a href="http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.1/bin/jakarta-tomcat-4.0.1.tar.gz" target="_blank">jakarta-tomcat-4.0.1.tar.gz</a>，将其解压到一个目录。</p>
      <p><span class="atitle3">(二)：配置</span><br>运行tomcat需要设置JAVA_HOME变量</p>
      <table bgcolor="#cccccc" border="1" cellpadding="5" cellspacing="0" width="100%"><tbody>
        <tr>
          <td><pre><code>set JAVA_HOME=c:/jdk (win98，在msdos方式下使用，或者放入autoexec.bat中)<br>export JAVA_HOME=/usr/local/jdk (linux下使用，放到/etc/bashrc或者/etc/profile中)<br></code>
</pre></td></tr></tbody></table><br><br>
      <p><span class="atitle3">(三)：运行</span><br>设置完毕后就可以运行tomcat服务器了，进入tomcat的bin目录，win98下用startup启动tomcat，linux下用startup.sh，相应的关闭tomcat的命令为shutdown和shutdown.sh。</p>
      <p>启动后可以在浏览器中输入http://localhost:8080/测试，由于tomcat本身具有web服务器的功能，因此我们不必安装apache，当然其也可以与apache集成到一起，下面会介绍。</p>
      <p>下面你可以测试其自带的jsp和servlet示例。</p>
      <p><a id="3" name="3"><span class="atitle2">三：应用</span></a></p>
      <p><span class="atitle3">(一):目录结构</span><br>tomcat的目录结构如下：</p>
      <table bgcolor="#cccccc" border="1" cellpadding="5" cellspacing="0" width="100%"><tbody>
        <tr>
          <td>目录名</td>
          <td>简介</td></tr>
        <tr>
          <td>bin</td>
          <td>存放启动和关闭tomcat脚本</td></tr>
        <tr>
          <td>conf</td>
          <td>包含不同的配置文件,server.xml(Tomcat的主要配置文件)和web.xml</td></tr>
        <tr>
          <td>work</td>
          <td>存放jsp编译后产生的class文件</td></tr>
        <tr>
          <td>webapp</td>
          <td>存放应用程序示例，以后你要部署的应用程序也要放到此目录</td></tr>
        <tr>
          <td>logs</td>
          <td>存放日志文件</td></tr>
        <tr>
          <td>lib/japser/common</td>
          <td>这三个目录主要存放tomcat所需的jar文件</td></tr></tbody></table><br><br>
      <p><span class="atitle3">(二)：server.xml配置简介</span><br>下面我们将讲述这个文件中的基本配置信息，更具体的配置信息见tomcat的文档</p>
      <table bgcolor="#cccccc" border="1" cellpadding="0" cellspacing="0" width="80%">
        <tbody>
        <tr>
          <td width="27%">元素名</td>
          <td width="21%">属性</td>
          <td width="52%">解释</td></tr>
        <tr>
          <td rowspan="2" width="27%">server</td>
          <td width="21%">port</td>
          <td width="52%">指定一个端口，这个端口负责监听关闭tomcat的请求</td></tr>
        <tr>
          <td width="21%">shutdown</td>
          <td width="52%">指定向端口发送的命令字符串</td></tr>
        <tr>
          <td width="27%">service</td>
          <td width="21%">name</td>
          <td width="52%">指定service的名字</td></tr>
        <tr>
          <td rowspan="7" width="27%">Connector<br>(表示客户端和service之间的连接)</td>
          <td width="21%">port</td>
          <td width="52%">指定服务器端要创建的端口号，并在这个断口监听来自客户端的请求</td></tr>
        <tr>
          <td width="21%">minProcessors</td>
          <td width="52%">服务器启动时创建的处理请求的线程数</td></tr>
        <tr>
          <td width="21%">maxProcessors</td>
          <td width="52%">最大可以创建的处理请求的线程数</td></tr>
        <tr>
          <td width="21%">enableLookups</td>
          <td width="52%">如果为true，则可以通过调用request.getRemoteHost()进行DNS查询来得到远程客户端的实际主机名，若为false则不进行DNS查询，而是返回其ip地址</td></tr>
        <tr>
          <td width="21%">redirectPort</td>
          <td width="52%">指定服务器正在处理http请求时收到了一个SSL传输请求后重定向的端口号</td></tr>
        <tr>
          <td width="21%">acceptCount</td>
          <td width="52%">指定当所有可以使用的处理请求的线程数都被使用时，可以放到处理队列中的请求数，超过这个数的请求将不予处理</td></tr>
        <tr>
          <td width="21%">connectionTimeout</td>
          <td width="52%">指定超时的时间数(以毫秒为单位)</td></tr>
        <tr>
          <td width="27%">Engine<br>(表示指定service中的请求处理机，接收和处理来自Connector的请求)</td>
          <td width="21%">defaultHost</td>
          <td width="52%">指定缺省的处理请求的主机名，它至少与其中的一个host元素的name属性值是一样的</td></tr>
        <tr>
          <td rowspan="3" width="27%">Context<br>(表示一个web应用程序，通常为WAR文件，关于WAR的具体信息见servlet规范)</td>
          <td width="21%">docBase</td>
          <td width="52%">应用程序的路径或者是WAR文件存放的路径</td></tr>
        <tr>
          <td width="21%">path</td>
          <td width="52%">表示此web应用程序的url的前缀，这样请求的url为http://localhost:8080/path/****</td></tr>
        <tr>
          <td width="21%">reloadable</td>
          <td width="52%">这个属性非常重要，如果为true，则tomcat会自动检测应用程序的/WEB-INF/lib 
            和/WEB-INF/classes目录的变化，自动装载新的应用程序，我们可以在不重起tomcat的情况下改变应用程序</td></tr>
        <tr>
          <td rowspan="3" width="27%">
            <p>host<br>(表示一个虚拟主机)</p></td>
          <td width="21%">name</td>
          <td width="52%">指定主机名</td></tr>
        <tr>
          <td width="21%">appBase</td>
          <td width="52%">应用程序基本目录，即存放应用程序的目录</td></tr>
        <tr>
          <td width="21%">unpackWARs</td>
          <td width="52%">如果为true，则tomcat会自动将WAR文件解压，否则不解压，直接从WAR文件中运行应用程序</td></tr>
        <tr>
          <td rowspan="4">
            <p>Logger<br>(表示日志，调试和错误信息)</p></td>
          <td width="21%">className</td>
          <td width="52%">指定logger使用的类名，此类必须实现org.apache.catalina.Logger 
        接口</td></tr>
        <tr>
          <td width="21%">prefix</td>
          <td width="52%">指定log文件的前缀</td></tr>
        <tr>
          <td width="21%">suffix</td>
          <td width="52%">指定log文件的后缀</td></tr>
        <tr>
          <td width="21%">timestamp</td>
          <td width="52%">如果为true，则log文件名中要加入时间，如下例:localhost_log.2001-10-04.txt</td></tr>
        <tr>
          <td width="27%">
            <p>Realm<br>(表示存放用户名，密码及role的数据库)</p></td>
          <td width="21%">className</td>
          <td width="52%">指定Realm使用的类名，此类必须实现org.apache.catalina.Realm接口</td></tr>
        <tr>
          <td rowspan="3">
            <p>Valve<br>(功能与Logger差不多，其prefix和suffix属性解释和Logger 中的一样)</p></td>
          <td width="21%">className</td>
          <td width="52%">
            <p>指定Valve使用的类名，如用org.apache.catalina.valves.AccessLogValve类可以记录应用程序的访问信息</p></td></tr>
        <tr>
          <td width="21%">directory</td>
          <td width="52%">指定log文件存放的位置</td></tr>
        <tr>
          <td width="21%">pattern</td>
          <td width="52%">有两个值，common方式记录远程主机名或ip地址，用户名，日期，第一行请求的字符串，HTTP响应代码，发送的字节数。combined方式比common方式记录的值更多</td></tr></tbody></table>
      <p>注
意：1：经过我测试，我设置Context
的path="",reloadable=true，然后放一个WAR文件到webapps目录，结果tomcat不能检测出此文件(重起tomcat可
以)，而把此文件解压，则tomcat会自动检测出这个新的应用程序。如果不能自动检测WAR文件，我们可以利用下面管理中讲的方法来部署应用程序。</p>
      <p>2：默认的server.xml中，Realm元素只设置了一个className属性，但此文件中也包含几个通过JDBC连接到数据库进行验证的示例(被注释掉了)，通过Realm元素我们可以实现容器安全管理(Container 
      Managed Security)。</p>
      <p>3：还有一些元素我们没有介绍，如Parameter，loader，你可以通过tomcat的文档获取这些元素的信息。</p>
      <p><span class="atitle3">(三)：管理</span></p>
      <p><b>1：配置</b><br>在进行具体的管理之前，我们先给tomcat添加一个用户，使这个用户有权限来进行管理。</p>
      <p>打开conf目录下的tomcat-users.xml文件，在相应的位置添加下面一行：</p>
      <table bgcolor="#cccccc" border="1" cellpadding="5" cellspacing="0" width="100%"><tbody>
        <tr>
          <td><pre><code>&lt;user name="zf" password="zf" roles="standard,manager"/&gt; <br></code>
</pre></td></tr></tbody></table><br><br>
      <p>注意：这一行的最后部分一定是/&gt;,tomcat的文档掉了/符号，如果没有/符号的话，tomcat重起时将无法访问应用程序。通过logs/catalina.out文件你可以看到这个错误的详细信息。</p>
      <p>然后重起tomcat，在浏览器中输入http://localhost:8080/manager/，会弹出对话框，输入上面的用户名和密码即可。</p>
      <p><b>2：应用程序列表</b><br>在浏览器中输入http://localhost:8080/manager/list，浏览器将会显示如下的信息：</p>
      <table bgcolor="#cccccc" border="1" cellpadding="5" cellspacing="0" width="100%"><tbody>
        <tr>
          <td><pre><code>OK - Listed applications for virtual host localhost<br>/ex:running:1<br>/examples:running:1<br>/webdav:running:0<br>/tomcat-docs:running:0<br>/manager:running:0<br>/:running:0</code>
</pre></td></tr></tbody></table><br><br>
      <p>面的信息分别为应用程序的路径，当前状态(running 或者stopped)，与这个程序相连的session数。</p>
      <p><b>3：重新装载应用程序</b><br>在浏览器中输入 
      http://localhost:8080/manager/reload?path=/examples，浏览器显示如下：</p>
      <table bgcolor="#cccccc" border="1" cellpadding="5" cellspacing="0" width="100%"><tbody>
        <tr>
          <td><pre><code>OK - Reloaded application at context path /examples  <br></code>
</pre></td></tr></tbody></table><br><br>
      <p>表示example应用程序装载成功，如果我们将server.xml的Context元素的reloadable属性设为true(见上面表格)，则没必要利用这种方式重新装载应用程序，因为tomcat会自动装载。</p>
      <p><b>4：显示session信息</b><br>在浏览器中输入http://localhost:8080/manager/sessions?path=/examples，浏览器显示如下：</p>
      <table bgcolor="#cccccc" border="1" cellpadding="5" cellspacing="0" width="100%"><tbody>
        <tr>
          <td><pre><code>OK - Session information for application at context path /examples Default maximum session inactive interval 30 minutes  <br></code>
</pre></td></tr></tbody></table><br><br>
      <p><b>5：启动和关闭应用程序</b><br>在浏览器中输入http://localhost:8080/manager/start?path=/examples和http://localhost:8080/manager/stop?path=/examples分别启动和关闭examples应用程序。</p>
      <p><b>6：部署及撤销部署</b><br>WAR有两种组织方式，一种是按一定的目录结构组织文件，一种是一个后缀为WAR的压缩包，因此它的部署方式也有两种：<br>(1)：在浏览器中输入：<code>http://localhost:8080/manager/install?path=/examples&amp;war=file:/c:\examples</code><br>就会将按目录结构组织的WAR部署</p>
      <p>(2)：如果输入:<code>http://localhost:8080/manager/install?path=/examples&amp;war=jar:file:/c:\examples.war!/</code><br>就会将按压缩包组织的WAR部署，注意此url后半部分一定要有!/号。</p>
      <p>部署后就可以用 http://localhost:8080/examples访问了。</p>
      <p>在浏览器中输入：<code>http://localhost:8080/manager/remove?path=/examples</code><br>就会撤销刚才部署的应用程序。</p>
      <p><span class="atitle3">(四)：与apache集成</span><br>虽然tomcat也可以作web服务器,但其处理静态html的速度比不上apache,且其作为web服务器的功能远不如apache,因此我们想把apache和tomcat集成起来。</p>
      <p>我们以linux系统为例介绍.</p>
      <p>从apache网站下载<a href="http://www.apache.org/dist/httpd/apache_1.3.22.tar.gz" target="_blank">apache1.3.22源代码版本</a>，然后使用如下命令配置安装apache：</p>
      <table bgcolor="#cccccc" border="1" cellpadding="5" cellspacing="0" width="100%"><tbody>
        <tr>
          <td><pre><code>mkdir /usr/local/apache<br>tar zxvf apache.1.32.tar.gz<br>cd apache.1.32<br>./configure --prefix=/usr/local/apache --enable-module=so <br>make<br>make install<br></code>
</pre></td></tr></tbody></table><br><br>
      <p>注意configure命令指定目标安装目录，并且加入DSO(Dynamic Shared 
      Object)支持，注意一定不要忘了这一个选项。</p>
      <p>然后下载<a href="http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.1/bin/linux/i386/webapp-module-1.0-tc40-linux-glibc2.2.tar.gz" target="_blank">webapp模块</a>，将解压后mod_webapp.so文件放入apache的libexec目录，编辑apache的conf目录下的httpd.conf，在这个文件的最后加入下面三行：</p>
      <table bgcolor="#cccccc" border="1" cellpadding="5" cellspacing="0" width="100%"><tbody>
        <tr>
          <td><pre><code>LoadModule webapp_module libexec/mod_webapp.so<br>WebAppConnection warpConnection warp localhost:8008<br>WebAppDeploy examples warpConnection /examples/ <br></code>
</pre></td></tr></tbody></table><br><br>
      <p>第一行是加入webapp模块，如果编译apache时不增加DSO支持，则无法使用LoadModule指令，第二行指定tomcat与apache的连接，第三行指定部署那个应用，这两个指令使用格式如下：</p>
      <table bgcolor="#cccccc" border="1" cellpadding="5" cellspacing="0" width="100%"><tbody>
        <tr>
          <td><pre><code>WebAppConnection [connection name] [provider] [host:port]<br>WebAppDeploy [application name] [connection name] [url path]  <br></code>
</pre></td></tr></tbody></table><br><br>
      <p>其中connection 
      name指定连接名，provider只能是warp，port端口与你的tomcat的配置文件server.xml最后几行指定的要保持一致。文件如下：</p>
      <table bgcolor="#cccccc" border="1" cellpadding="5" cellspacing="0" width="100%"><tbody>
        <tr>
          <td><pre><code>&lt;Service name="Tomcat-Apache"&gt; <br>&lt;Connector className="org.apache.catalina.connector.warp.WarpConnector"<br>port="8008" minProcessors="5" maxProcessors="75"<br>enableLookups="true"<br>acceptCount="10" debug="0"/&gt;<br>******<br>&lt;/Service&gt; <br></code>
</pre></td></tr></tbody></table><br><br>
      <p>application name与你在tomcat中部署的应用名一致，url 
      path指定访问这个应用的url。例如上面的例子可以通过http://localhost/examples/来访问tomcat中的examples应用。</p>
      <p><span class="atitle3">(五)：中文问题</span><br>一般jsp的乱码问题可以通过在jsp中加入&lt;%@ page 
      contentType="text/html;charset=GB2312" 
      %&gt;来解决，至于servlet的乱码在可以使用servlet2.3中提供的HttpServeletRequest.setCharacterEncoding函数。更详细的中文问题请见<a href="http://www-900.ibm.com/developerWorks/cn/java/jsp_dbcsz/index.shtml" target="_blank">JSP/Servlet 中的汉字编码问题</a>。</p>
      <p><a id="4" name="4"><span class="atitle2">四：综述</span></a><br>tomcat作为一个servlet(jsp也被编译为servlet执行)容器，其应用前景是非常好的，如果与<a href="http://www.jboss.org/" target="_blank">jboss</a>结合起来，则可以实现sun的j2ee规范(用jboss作ejb服务器)。jboss的官方网站也提供集成了tomcat3.2*的jboss以供下载。另外一个开源的应用服务器(<a href="http://www.enhydra.org/" target="_blank">enhydra</a>) 
      也是基于tomcat的，其提供了更友好的管理界面，部署应用程序也更简单，功能也更强大。</p>
      <p><a id="resources" name="resources"><span class="atitle2">参考资料：</span></a></p>
      <ul class="n01"><li><a href="http://jakarta.apache.org/tomcat/tomcat-4.0-doc/index.html">tomcat文档</a> 

        </li><li><a href="http://www.jguru.com/faq/Tomcat">http://www.jguru.com/faq/Tomcat</a> 

        </li><li><a href="http://httpd.apache.org/docs/">apache的文档</a> 
      </li></ul><br><br>
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tbody>
        <tr>
          <td><a id="author1" name="author1"><span class="atitle2">关于作者</span></a> 
            <br>宗锋：西北大学计算机系硕士，对于基于 web 的各种新技术都感兴趣。</td></tr></tbody></table></td></tr></tbody></table><img src ="http://www.blogjava.net/juhongtao/aggbug/25578.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/juhongtao/" target="_blank">javaGrowing</a> 2005-12-27 15:31 <a href="http://www.blogjava.net/juhongtao/articles/25578.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>多个经典英语学习网站</title><link>http://www.blogjava.net/juhongtao/articles/16753.html</link><dc:creator>javaGrowing</dc:creator><author>javaGrowing</author><pubDate>Tue, 25 Oct 2005 06:23:00 GMT</pubDate><guid>http://www.blogjava.net/juhongtao/articles/16753.html</guid><wfw:comment>http://www.blogjava.net/juhongtao/comments/16753.html</wfw:comment><comments>http://www.blogjava.net/juhongtao/articles/16753.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/juhongtao/comments/commentRss/16753.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/juhongtao/services/trackbacks/16753.html</trackback:ping><description><![CDATA[<STRONG>多个经典英语学习网站<BR><BR></STRONG><A class=ilink href="http://www.edunet.com/elt" target=_blank>http://www.edunet.com/elt</A><BR>主题：是一个全方位的学英语作为第二语言的网站<BR>功能：聊天室，语法讲解，练习，小测试，成语讲解<BR>特色：特别深入地介绍了语法，听力，沟通技巧等<BR>对象：ESL教师和学英语人士<BR><BR>《世界日报》北美版-生活美语<BR><A class=ilink href="http://www.chineseworld.com/publish/37_9999.r/r.htm" target=_blank>http://www.chineseworld.com/publish/37_9999.r/r.htm</A><BR>主题：生活化和实用化的英语网页<BR>功能：分主题讲解英语的实用方法，还有母语非英语人士闹的语言笑话<BR>特色：灵活生动，有许多实例<BR>对象：英语基础教好的人士<BR><BR><A class=ilink href="http://www.englishtown.com/" target=_blank><FONT color=#004080>http://www.englishtown.com</FONT></A><BR>主题：是目前网上最有深度的英语学习网站<BR>功能：非常好的语法讲解，练习，和阅读材料<BR>特色：正宗英国英语<BR>对象：学英语人士<BR><BR><A class=ilink href="http://www.english-at-home.com/" target=_blank>http://www.english-at-home.com/</A><BR>主题：是一个全方位的学英语作为第二语言的网站<BR>功能：聊天室，语法讲解，练习，小测试，成语讲解<BR>特色：特别深入地介绍了语法，听力，沟通技巧等<BR>对象：ESL教师和学英语人士<BR><BR><A class=ilink href="http://www.englishbaby.com/" target=_blank>http://www.englishbaby.com/</A><BR>主题：是一个年轻人学习交流的美国英语网站<BR>功能：每天不同的网上课程，以美国流行文化为主题<BR>特色：可以学到很多美国俚语和方言<BR>对象：面向年轻人<BR><BR><A class=ilink href="http://www.englishclub.net/" target=_blank>http://www.englishclub.net/</A><BR>主题：丰富齐全的商业性英文网站<BR>功能：语法讲解，练习，参考资料，教师材料<BR>对象：ESL教师和学英语人士<BR><BR><A class=ilink href="http://www.englishpage.com/index.html" target=_blank>http://www.englishpage.com/index.html</A><BR>主题：针对英文基础较好的学习人士和教师的网站<BR>功能：阅读，游戏。语法讲解，讨论等<BR>特色：深入讲解了时态用法，每周有新课程推出，旧课程可以在存档中找到<BR>对象：ESL教师和学英语人士<BR><BR><A class=ilink href="http://members.home.net/englishzone/index.html" target=_blank>http://members.home.net/englishzone/index.html</A><BR>主题：非商业性英文学习网站<BR>功能：语法讲解，练习，小成语讲解，英文笑话，阅读和写作<BR>对象：学英语人士<BR><BR><A class=ilink href="http://www.homestead.com/ESLflow/Index.html" target=_blank>http://www.homestead.com/ESLflow/Index.html</A><BR>主题：内容组织得很好的英文网站<BR>功能：语法讲解，口语，英语对话，阅读和课程安排<BR>特色：用流程图的方式讲解英语语法概念<BR>对象：ESL教师和学英语人士<BR><BR><A class=ilink href="http://www.eslhouse.com/" target=_blank>http://www.eslhouse.com/</A><BR>主题：内容广泛，参考资料甚多<BR>功能：大量词汇讲解，课程安排和参考资料<BR>特色：多媒体中心可播放课程<BR>对象：ESL教师和学英语人士<BR><BR><A class=ilink href="http://www.eslpartyland.com/default.htm" target=_blank>http://www.eslpartyland.com/default.htm</A><BR>主题：自学和互相交流<BR>功能：75个互动式测试和15个论坛，让学生互相交流，教师可以下载课程材料<BR>特色：互动式<BR>对象：ESL教师和学英语人士<BR><BR><A class=ilink href="http://gwis2.circ.gwu.edu/~gwvcusas/" target=_blank>http://gwis2.circ.gwu.edu/~gwvcusas/</A><BR>主题：由George Washington University的Professor Christine Meloni维护的ESL链接网页<BR>功能：有学多学习英语的链接<BR>对象：ESL教师和学英语人士<BR><BR><A class=ilink href="http://www.tolearnenglish.com/" target=_blank>http://www.ToLearnEnglish.com</A><BR>主题：内容广泛，资源丰富，值得一看<BR>功能：聊天室，语法讲解，练习，小测试，图片，论坛<BR>特色：做完练习可以得到评语，老师可以在线制作试题<BR>对象：ESL教师和学英语人士<BR><BR><A class=ilink href="http://deil.lang.uiuc.edu/" target=_blank>http://deil.lang.uiuc.edu/</A><BR>主题：包括了网上学英语的一些最基本的内容<BR>功能：语法讲解，练习，互动式3听力训练，笔友交换，教师参考<BR>对象：ESL教师和学英语人士<BR><BR><A class=ilink href="http://www.longman-elt.com/index.html" target=_blank>http://www.longman-elt.com/index.html</A><BR>主题：为中国朋友所熟知的朗曼英语教学方法<BR>功能：测试，专题文章，链接，小窍门<BR>对象：ESL教师和学英语人士<BR><BR><A class=ilink href="http://www.parlo.com/index.asp" target=_blank>http://www.parlo.com/index.asp</A><BR>主题：学语言的网站<BR>功能：对语言结构，国际文化作出探讨<BR>特色：教你怎样学语言，而不仅是英语<BR>对象：ESL教师和学英语人士<BR><BR><A class=ilink href="http://www.peakenglish.com/" target=_blank>http://www.peakenglish.com</A><BR>主题：在线的远程英语学习网站 功能：词汇，阅读，听力(用REALAUDIO)，语法课程，<BR>特色：所教英语是用于美国的<BR>对象：学英语人士<BR><BR><A class=ilink href="http://schmooze.hunter.cuny.edu:8888/" target=_blank>http://schmooze.hunter.cuny.edu:8888/</A><BR>主题：英语学习个网站，可以一对一或分小组进行对话<BR>功能：在线字典，语言游戏，USENET<BR>对象：学英语人士<BR><BR><A class=ilink href="http://members.tripod.com/~towerofenglish/index.htm" target=_blank>http://members.tripod.com/~towerofenglish/index.htm</A><BR>主题：非常友好的英文学习网站<BR>功能：设计专业的网站，大量的有用资源<BR>对象：学英语人士<BR><BR>非常不错，大多数是英语教学的英语网站，国内网站其实学英语的都不错，而且一些英语听力和口语的网站还有不少，特别是那些VOA等原声听力网站。<BR>博客网址中还有一些：<BR><BR><A class=ilink href="http://wz.blogchina.com/2650405/index.htm" target=_blank>http://wz.blogchina.com/2650405/index.htm</A><BR><BR>可以参考。比如这个 <A class=ilink href="http://www.unsv.com/" target=_blank><FONT color=#004080>http://www.unsv.com</FONT></A><BR>是英语听力的好帮手。 <BR><img src ="http://www.blogjava.net/juhongtao/aggbug/16753.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/juhongtao/" target="_blank">javaGrowing</a> 2005-10-25 14:23 <a href="http://www.blogjava.net/juhongtao/articles/16753.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java Learning Path资源</title><link>http://www.blogjava.net/juhongtao/articles/12706.html</link><dc:creator>javaGrowing</dc:creator><author>javaGrowing</author><pubDate>Mon, 12 Sep 2005 01:58:00 GMT</pubDate><guid>http://www.blogjava.net/juhongtao/articles/12706.html</guid><wfw:comment>http://www.blogjava.net/juhongtao/comments/12706.html</wfw:comment><comments>http://www.blogjava.net/juhongtao/articles/12706.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/juhongtao/comments/commentRss/12706.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/juhongtao/services/trackbacks/12706.html</trackback:ping><description><![CDATA[Java Learning Path（五）资源篇 <BR><BR>1、 <A class=ilink href="http://java.sun.com/" target=_blank>http://java.sun.com/</A> (英文) <BR>Sun的Java网站，是一个应该经常去看的地方。不用多说。 <BR><BR>2、http://www-900.ibm.com/developerWorks/cn/ <BR>IBM的developerWorks网站，英语好的直接去英文主站点看。这里不但是一个极好的面向对象的分析设计网站，也是Web Services，Java，Linux极好的网站。强烈推荐！！！ <BR><BR>3、http://www.javaworld.com/ (英文) <BR>关于Java很多新技术的讨论和新闻。想多了解Java的方方面面的应用，这里比较好。 <BR><BR>4、http://dev2dev.bea.com.cn/index.jsp <BR>BEA的开发者园地，BEA作为最重要的App Server厂商，有很多独到的技术，在Weblogic上做开发的朋友不容错过。 <BR><BR>5、http://www.huihoo.com/ <BR>灰狐动力网站，一个专业的中间件网站，虽然不是专业的Java网站，但是在J2EE企业应用技术方面有深厚的造诣。 <BR><BR>6、http://www.theserverside.com/home/ (英文) <BR>TheServerSide是一个著名的专门面向Java Server端应用的网站。 <BR><BR>7、http://www.javaresearch.org/ <BR>Java研究组织，有很多优秀的Java方面的文章和教程，特别是在JDO方面的文章比较丰富。 <BR><BR>8、http://www.cnjsp.org/ <BR>JSP技术网站，有相当多的Java方面的文章和资源。 <BR><BR>9、http://www.jdon.com/ <BR>Jdon论坛，是一个个人性质的中文J2EE专业技术论坛，在众多的Java的中文论坛中，Jdon一个是技术含量非常高，帖子质量非常好的论坛。 <BR><BR>10、http://sourceforge.net/ <BR>SourgeForge是一个开放源代码软件的大本营，其中也有非常非常丰富的Java的开放源代码的著名的软件。 <BR>11. http://www.matrix.org.cn<img src ="http://www.blogjava.net/juhongtao/aggbug/12706.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/juhongtao/" target="_blank">javaGrowing</a> 2005-09-12 09:58 <a href="http://www.blogjava.net/juhongtao/articles/12706.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>StringBuffer versus String </title><link>http://www.blogjava.net/juhongtao/articles/12702.html</link><dc:creator>javaGrowing</dc:creator><author>javaGrowing</author><pubDate>Mon, 12 Sep 2005 01:25:00 GMT</pubDate><guid>http://www.blogjava.net/juhongtao/articles/12702.html</guid><wfw:comment>http://www.blogjava.net/juhongtao/comments/12702.html</wfw:comment><comments>http://www.blogjava.net/juhongtao/articles/12702.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/juhongtao/comments/commentRss/12702.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/juhongtao/services/trackbacks/12702.html</trackback:ping><description><![CDATA[What is the performance impact of the StringBuffer and String classes? <BR><BR>Summary<BR>Reggie illuminates the underlying performance impact of using the StringBuffer and String classes when performing concatenations. (600 words) <BR>By Reggie Hutcherson <BR><BR>Java provides the StringBuffer and String classes, and the String class is used to manipulate character strings that cannot be changed. <FONT color=#006400>Simply stated, objects of type String are read only and immutable. The StringBuffer class is used to represent characters that can be modified. <BR></FONT><BR>The significant performance difference between these two classes is that StringBuffer is faster than String when performing simple concatenations. In String manipulation code, character strings are routinely concatenated. Using the String class, concatenations are typically performed as follows: <BR><BR>String str = new String ("Stanford ");<BR>str += "Lost!!";<BR><BR>If you were to use StringBuffer to perform the same concatenation, you would need code that looks like this: <BR><BR>StringBuffer str = new StringBuffer ("Stanford ");<BR>str.append("Lost!!");<BR><BR>Developers usually assume that the first example above is more efficient because they think that the second example, which uses the append method for concatenation, is more costly than the first example, which uses the + operator to concatenate two String objects. <BR><BR>The + operator appears innocent, but the code generated produces some surprises. Using a StringBuffer for concatenation can in fact produce code that is significantly faster than using a String. To discover why this is the case, we must examine the generated bytecode from our two examples. The bytecode for the example using String looks like this: <BR><BR>0 new #7 <CLASS java.lang.String><BR>3 dup <BR>4 ldc #2 <STRING ? ?Stanford><BR>6 invokespecial #12 <Method java.lang.String(java.lang.String)><BR>9 astore_1<BR>10 new #8 <CLASS java.lang.StringBuffer><BR>13 dup<BR>14 aload_1<BR>15 invokestatic #23 <Method java.lang.String valueOf(java.lang.Object)><BR>18 invokespecial #13 <BR>21 ldc #1 <STRING ?Lost!!?><BR>23 invokevirtual #15 <Method java.lang.StringBuffer append(java.lang.String)><BR>26 invokevirtual #22 <Method java.lang.String toString()><BR>29 astore_1<BR><BR>The bytecode at locations 0 through 9 is executed for the first line of code, namely: <BR><BR>String str = new String("Stanford ");<BR><BR>Then, the bytecode at location 10 through 29 is executed for the concatenation: <BR><BR>str += "Lost!!";<BR><BR>Things get interesting here. The bytecode generated for the concatenation creates a StringBuffer object, then invokes its append method: the temporary StringBuffer object is created at location 10, and its append method is called at location 23. Because the String class is immutable, a StringBuffer must be used for concatenation. <BR><BR>After the concatenation is performed on the StringBuffer object, it must be converted back into a String. This is done with the call to the toString method at location 26. This method creates a new String object from the temporary StringBuffer object. The creation of this temporary StringBuffer object and its subsequent conversion back into a String object are very expensive. <BR><BR>In summary, the two lines of code above result in the creation of three objects: <BR><BR>A String object at location 0 <BR>A StringBuffer object at location 10 <BR>A String object at location 26 <BR>Now, let's look at the bytecode generated for the example using StringBuffer: <BR><BR>0 new #8 <CLASS java.lang.StringBuffer><BR>3 dup<BR>4 ldc #2 <STRING ? ?Stanford><BR>6 invokespecial #13 <Method java.lang.StringBuffer(java.lang.String)><BR>9 astore_1<BR>10 aload_1 <BR>11 ldc #1 <STRING ?Lost!!?><BR>13 invokevirtual #15 <Method java.lang.StringBuffer append(java.lang.String)><BR>16 pop<BR><BR>The bytecode at locations 0 to 9 is executed for the first line of code: <BR><BR>StringBuffer str = new StringBuffer("Stanford ");<BR><BR>The bytecode at location 10 to 16 is then executed for the concatenation: <BR><BR>str.append("Lost!!");<BR><BR>Notice that, as is the case in the first example, this code invokes the append method of a StringBuffer object. Unlike the first example, however, there is no need to create a temporary StringBuffer and then convert it into a String object. This code creates only one object, the StringBuffer, at location 0. <BR><BR>In conclusion, StringBuffer concatenation is significantly faster than String concatenation. Obviously, StringBuffers should be used in this type of operation when possible. If the functionality of the String class is desired, consider using a StringBuffer for concatenation and then performing one conversion to String. <BR><BR>About the author<BR>Reggie Hutcherson is a Sun technology evangelist. He evangelizes Sun's Java 2 Platform technologies around the world concentrating on J2SE and the HotSpot performance engine. <BR><BR>Resources <BR><BR>"JavaWorld debuts new weekly Java performance column," Reggie Hutcherson (JavaWorld, March 2000): <BR><A class=ilink href="http://www.javaworld.com/jw-03-2000/jw-03-javaperf.html" target=_blank>http://www.javaworld.com/jw-03-2000/jw-03-javaperf.html</A><BR><BR>"The basics of Java performance," Reggie Hutcherson (JavaWorld, March 2000): <BR><A class=ilink href="http://www.javaworld.com/jw-03-2000/jw-03-javaperf_2.html" target=_blank>http://www.javaworld.com/jw-03-2000/jw-03-javaperf_2.html</A><BR><BR>"Performance problem or design problem?" Reggie Hutcherson (JavaWorld, March 2000): <BR><A class=ilink href="http://www.javaworld.com/jw-03-2000/jw-03-javaperf_3.html" target=_blank>http://www.javaworld.com/jw-03-2000/jw-03-javaperf_3.html</A><BR><BR>"Compiler optimizations," Reggie Hutcherson (JavaWorld, March 2000): <BR><A class=ilink href="http://www.javaworld.com/jw-03-2000/jw-03-javaperf_4.html" target=_blank>http://www.javaworld.com/jw-03-2000/jw-03-javaperf_4.html</A> <BR><BR></Method></Method></Method></Method></Method></Method><img src ="http://www.blogjava.net/juhongtao/aggbug/12702.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/juhongtao/" target="_blank">javaGrowing</a> 2005-09-12 09:25 <a href="http://www.blogjava.net/juhongtao/articles/12702.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java - A Slow Language? It Depends on What You're Talking About</title><link>http://www.blogjava.net/juhongtao/articles/12701.html</link><dc:creator>javaGrowing</dc:creator><author>javaGrowing</author><pubDate>Mon, 12 Sep 2005 01:24:00 GMT</pubDate><guid>http://www.blogjava.net/juhongtao/articles/12701.html</guid><wfw:comment>http://www.blogjava.net/juhongtao/comments/12701.html</wfw:comment><comments>http://www.blogjava.net/juhongtao/articles/12701.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/juhongtao/comments/commentRss/12701.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/juhongtao/services/trackbacks/12701.html</trackback:ping><description><![CDATA[<P>by <A href="http://dev2dev.bea.com/pub/au/105">Joakim Dahlstedt</A><BR>01/29/2004</P><!--  sidebar begins  --><!--  don't move sidebars  --><!--  sidebar ends  -->
<DIV id=summary></DIV>
<DIV id=content><I>In the past six years or so the claim that Java is a slow language has regularly appeared in articles and news discussions. Most of the time I follow the debate, but after a while I get bored because the discussions remain at the micro-benchmark level. It continues to amaze me that there isn't more focus on system-level performance in discussions of language performance.</I><BR><BR>Having spent seven years actively interested in the field of runtime system optimization and the past four years designing a server-side JVM, JRockit, I am pretty convinced that micro-benchmark results cannot be extended to the system level, where performance really matters. Thus, I thought it would be interesting to give you a view of the performance issue from a JVM developer perspective. I'm arguing that Java is anything but a slow and inefficient language, and that the JVM is the key component ensuring that the system is as fast and easy to deploy and run as it was fast and easy to develop.<BR><BR><B>Performance Is Not a Micro-Benchmark</B><BR>This is 2002 and people are still arguing that Java is a slow language. The most common argument comes from developers who have written small benchmarks in Java and then rewritten them in C and are touting how much faster the C programs are. I'm not writing this article to claim that they are wrong.<BR><BR>Of course they can write micro-benchmarks in a couple lines of Java code and redo the same benchmarks in C/C++ and the C programs will probably run faster than the Java programs. That's not where I disagree with them. I disagree with their conclusion; the results of a small micro-benchmark test cannot be extended to say anything about a large-scale application. I believe most systems will be built faster by fewer developers and they will even run faster if they are written in Java instead of C. Java is a language of scale; C is a language of micro-level performance. The development of Java is a natural result of the evolution of system development.<BR><BR><B>The System Development Evolution: From Punch Cards to Web Services</B><BR>What has happened during the past 30 years or so is an explosion - the explosion of large-scale system development. There are so many developers in the world now, and they're building systems that are larger than what anyone imagined possible 30 years ago. In addition, application development today is no longer an I-build-every-part-of-the-application-myself process. People use standard libraries, frameworks, application servers, and most recently, Web services, to build their applications.<BR><BR>The components are getting bigger and bigger and more and more general. These building blocks, which were once looked upon with disbelief and mistrust, are now taken for granted. However, using these general building blocks has a price: performance. We have traded performance for significantly reduced development time and system complexity. At least that's what we think and what our early measurements indicate. What if we're wrong?<BR><BR><B>Enter Java and JVMs</B><BR>The beauty of Java from a large-scale application performance perspective is in two features that are very crucial to performance for large-scale systems: type information and a runtime system (the JVM). The type information is needed by the code generator to discern who calls who, and who points to who. As a result more information can be extracted from a Java program than from a C program, if the compiler is smart. The end result is, of course, higher performance. The JVM is the vehicle for dynamic optimization. The JVM can analyze the behavior of the application and adapt itself and the generated code to the application.<BR><BR>The beauty of this runtime optimization approach is that for the first time ever, the whole system can be optimized specifically for how it is used without having the source code. This is the opportunity. The framework developer can build a general framework that gets used by application developers and that gets optimized specifically for each application that uses the framework. The general building blocks are broken down and melt into each other at runtime. It is the responsibility of the JVM to do this melting. The JVMs, including JRockit, have not reached that goal...yet.<BR><BR><B>When Dynamic Optimization Really Pays Off</B><BR>Let me give you another example of the benefits of dynamic optimization. Look at Intel's new 64-bit platform, the Itanium Processor. Its characteristics are novel and enticing. Nevertheless, its EPIC architecture puts very high pressure on the compiler. EPIC means that the compiler has to choose which instructions should be executed in parallel. Most normal processors today do that selection automatically in their out-of-order execution engine. Because the EPIC-based CPUs need to make fewer decisions, they increase the computational efficiency. The caveat is that the compiler has to make intelligent decisions for the performance to increase.<BR><BR>Given all this pressure on the compiler, you might think that EPIC architecture is well-suited for static compilation and that it virtually eliminates the need for a dynamic runtime system. I believe we'll be able to show you in the coming years how totally opposite the reality is. The reason is that the devil is in the details: for the compiler to be able to parallelize code in a good way requires more than knowing the instructions of the program. The compiler has to know two more things: the flow of the program, and the values that are passed around and used in different contexts.<BR><BR>A static compiler doesn't have this runtime information; it cannot tell what parts of the program are executed frequently or what values are commonly passed to a function from a specific call site. A dynamic runtime system, e.g., a JVM, is the easiest kind of system to collect and take advantage of such information. Consequently, I expect to see exciting gains during the next two years for the Itanium-based JVMs. There is a possibility that they'll catch up with and supercede the profile-guided C compilers on EPIC platforms. Because it lacks type information and a runtime system, C is inferior to Java for EPIC architecture.<BR><BR><B>The JVM - The Glue for the Building Blocks</B><BR>BEA acquired JRockit in February of this year, and we are now working to integrate JRockit into the BEA product line, making sure that it works well with all of the different BEA products. Bringing the building blocks and glue under the same roof makes your system more manageable and scalable and makes it run faster. The JRockit JVM is becoming an important piece of the BEA WebLogic Platform.<BR><BR>In conclusion, I still expect to see a lot of micro-benchmarks out there comparing Java and C programs, but I hope I've convinced you that using runtime systems like Sun Microsystems' HotSpot or BEA WebLogic JRockit Java is not slow or inefficient, and that the performance of a large-scale system built with Java may be superior to that of the same system built using C.<BR><BR>Copyright © 2002 SYS-CON Media, Inc.<BR></DIV><img src ="http://www.blogjava.net/juhongtao/aggbug/12701.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/juhongtao/" target="_blank">javaGrowing</a> 2005-09-12 09:24 <a href="http://www.blogjava.net/juhongtao/articles/12701.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>