<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
 <channel>
  <title>迷宫</title>
  <link>http://labyrinth.blogbus.com</link>
  <description><![CDATA[]]></description>
  <generator> by blogbus.com </generator>
  <lastBuildDate>Thu, 01 Jan 1970 07:00:00 +0700</lastBuildDate>
  <image>
									<url>http://public.blogbus.com/profile/head.gif</url>
									<title>迷宫</title>
									<link>http://labyrinth.blogbus.com</link>
								</image>  <item>
   <title>Jsp学习之一：SQLServer2000 JDBC的安装</title>
   <description><![CDATA[<p>1、下载SQLSERVER2000的jdbc驱动程序<br />在微软站点就有这个驱动程序：<br />Window操作系统下<br /><a href="http://download.microsoft.com/download/SQLSVR2000/jdbc/2000/NT45XP/EN-US/setup.exe">http://download.microsoft.com/download/SQLSVR2000/jdbc/2000/NT45XP/EN-US/setup.exe</a><br />另外还有Pack1和Pack2，也下下来。<br />2、安装JDBC和两个Pack<br />执行ms_jdbc_setup.exe可执行文件，一切只需要点击下一步，至到出现finish按钮，完成安装。ms_JDBC_setup默认安装路径为c:\Program Files\Microsoft SQL Server 2000 Driver for JDBC；此版本(Version 2.2.0022)仅支持Microsoft SQL Server 2000 Driver for JDBC；安装目录\lib\下的三个jar文件即是我们要的JDBC驱动核心，这三个文件是：msbase.jar，mssqlserver.jar，msutil.jar<br />3、将以上的三个jar文件加入到环境变量中去<br />    classpath:<br />      C:\Tomcat 5.0\common\lib\msbase.jar<br />      C:\Tomcat 5.0\common\lib\mssqlserver.jar<br />      C:\Tomcat 5.0\common\lib\msutil.jar   <br />4、测试<br />import java.sql.*; <br />public class Test{<br />  <br />  public static void main(String args[]){<br />    try{<br />      Class.forName(&quot;com.microsoft.jdbc.sqlserver.SQLServerDriver&quot;); <br />      Connection conn =<br />DriverManager.getConnection(&quot;jdbc:microsoft:sqlserver://localhost:1433;User=**;Password=****;DatabaseName=Northwind&quot;);<br />      Statement stmt=conn.createStatement(); <br />      String sql=&quot;select * from  employees&quot;; <br />      ResultSet rs = stmt.executeQuery(sql);<br />      while(rs.next()) { <br />             System.out.println(&quot;TestName:&quot;+rs.getString(&quot;FirstName&quot;));<br />                       }<br />     rs.close();<br />     stmt.close();<br />     conn.close();<br />} catch(Exception ex) { System.err.println(ex.getMessage()); }<br />}</p><p>}</p><p>编译、运行：<br />Javac Test.java<br />Java Test<br />结果为：</p><p>C:\&gt;java Testsql<br />TestName:Nancy<br />TestName:Andrew<br />TestName:Janet<br />TestName:Margaret<br />TestName:Steven<br />TestName:Michael<br />TestName:Robert<br />TestName:Laura<br />TestName:Anne<br /></p><!--sp--><div class="relpost"><br/><h3>随机文章：</h3><div><a href="http://sdgsshdshd.blogbus.com/logs/50212385.html">Ugg boots,the Guide of Popular</a> 2009-11-04</div><div><a href="http://sdgsshdshd.blogbus.com/logs/50212361.html">Ugg Classic Tall boots are Perfect for you</a> 2009-11-04</div><div><a href="http://tonyalice.blogbus.com/logs/50211906.html">没事人。一样样儿。</a> 2009-11-04</div><div><a href="/logs/1022898.html">微软自身的杀进程命令</a> 2005-02-18</div><div><a href="/logs/1021156.html">win2000下apache和tomcat的整合</a> 2005-02-17</div></div><div class="addfav"><br />收藏到：<span class= "delicious"><a href="http://delicious.com/save?url=http%3A%2F%2Flabyrinth.blogbus.com%2Flogs%2F1023076.html&title=Jsp%E5%AD%A6%E4%B9%A0%E4%B9%8B%E4%B8%80%EF%BC%9ASQLServer2000+JDBC%E7%9A%84%E5%AE%89%E8%A3%85">Del.icio.us</a></span></div><br /><br /><div class="sysmsg"><b><a href="http://www.blogbus.com" target="_blank">博客大巴，你的个人传媒早班车</a></b></div><br /><br />]]></description>
   <link>http://labyrinth.blogbus.com/logs/1023076.html</link>
   <author></author>
   <pubDate>Fri, 18 Feb 2005 20:46:00 +0800</pubDate>
  </item>
  <item>
   <title>微软自身的杀进程命令</title>
   <description><![CDATA[<p>问:怎么才能关掉一个用任务管理器关不了的进程？我前段时间发现我的机子里多了一个进程，只要开机就在，我用任务管理器却怎么关也关不了 <br />　　答1:杀进程很容易，随便找个工具都行。比如IceSword。关键是找到这个进程的启动方式，不然下次重启它又出来了。顺便教大家一招狠的。其实用Windows自带的工具就能杀大部分进程：</p><p>　　c:\&gt;ntsd -c q -p PID </p><p>　　只有System、SMSS.EXE和CSRSS.EXE不能杀。前两个是纯内核态的，最后那个是Win32子系统，ntsd本身需要它。ntsd从2000开始就是系统自带的用户态调试工具。被调试器附着(attach)的进程会随调试器一起退出，所以可以用来在命令行下终止进程。使用ntsd自动就获得了debug权限，从而能杀掉大部分的进程。ntsd会新开一个调试窗口，本来在纯命令行下无法控制，但如果只是简单的命令，比如退出(q)，用-c参数从命令行传递就行了。NtsdNtsd 按照惯例也向软件开发人员提供。只有系统开发人员使用此命令。有关详细信息，请参阅 NTSD 中所附的帮助文件。用法:开个cmd.exe窗口，输入：</p><p>　　ntsd -c q -p PID </p><p>　　把最后那个PID，改成你要终止的进程的ID。如果你不知道进程的ID，任务管理器－&gt;进程选项卡－&gt;查看－&gt;选择列－&gt;勾上&quot;PID（进程标识符）&quot;，然后就能看见了。 </p><p>　　答2：xp下还有两个好东东tasklist和tskill。tasklist能列出所有的进程，和相应的信息。tskill能查杀进程，语法很简单：tskill 程序名！！ </p><p>参考资料：<br />NTSD 中所附的帮助文件</p><p><font face="Century Gothic" size="2">usage: ntsd [-?] [-2] [-d] [-g] [-G] [-myob] [-lines] [-n] [-o] [-s] [-v] [-w]<br />            [-r BreakErrorLevel]  [-t PrintErrorLevel]<br />            [-hd] [-pd] [-pe] [-pt #] [-pv] [-x | -x{e|d|n|i} ]<br />            [-- | -p pid | -pn name | command-line | -z CrashDmpFile]<br />            [-zp CrashPageFile] [-premote transport] [-robp]<br />            [-aDllName] [-c &quot;command&quot;] [-i ImagePath] [-y SymbolsPath]<br />            [-clines #] [-srcpath SourcePath] [-QR </font><a href="file://machine/"><font face="Century Gothic" size="2">\\machine</font></a><font face="Century Gothic" size="2">] [-wake ]<br />            [-remote transport:server=name,portid] [-server transport:portid]<br />            [-ses] [-sfce] [-sicv] [-snul] [-noio] [-failinc] [-noshell]</font></p><p><font face="Century Gothic" size="2">where: -? displays this help text<br />       command-line is the command to run under the debugger<br />       -- is the same as -G -g -o -p -1 -d -pd<br />       -aDllName sets the default extension DLL<br />       -c executes the following debugger command<br />       -clines number of lines of output history retrieved by a remote client<br />       -failinc causes incomplete symbol and module loads to fail<br />       -d sends all debugger output to kernel debugger via DbgPrint<br />          -d cannot be used with debugger remoting<br />          -d can only be used when the kernel debugger is enabled<br />       -g ignores initial breakpoint in debuggee<br />       -G ignores final breakpoint at process termination<br />       -hd specifies that the debug heap should not be used<br />           for created processes.  This only works on Windows Whistler.<br />       -o debugs all processes launched by debuggee<br />       -p pid specifies the decimal process Id to attach to<br />       -pd specifies that the debugger should automatically detach<br />       -pe specifies that any attach should be to an existing debug port<br />       -pn name specifies the name of the process to attach to<br />       -pt # specifies the interrupt timeout<br />       -pv specifies that any attach should be noninvasive<br />       -r specifies the (0-3) error level to break on (SeeSetErrorLevel)<br />       -robp allows breakpoints to be set in read-only memory<br />       -t specifies the (0-3) error level to display (SeeSetErrorLevel)<br />       -w specifies to debug 16 bit applications in a separate VDM<br />       -x sets second-chance break on AV exceptions<br />       -x{e|d|n|i} sets the break status for the specified event<br />       -2 creates a separate console window for debuggee<br />       -i ImagePath specifies the location of the executables that generated<br />          the fault (see _NT_EXECUTABLE_IMAGE_PATH)<br />       -lines requests that line number information be used if present<br />       -myob ignores version mismatches in DBGHELP.DLL<br />       -n enables verbose output from symbol handler<br />       -noio disables all I/O for dedicated remoting servers<br />       -noshell disables the .shell (!!) command<br />       -QR &lt;</font><a href="file://machine/"><font face="Century Gothic" size="2">\\machine</font></a><font face="Century Gothic" size="2">&gt; queries for remote servers<br />       -s disables lazy symbol loading<br />       -ses enables strict symbol loading<br />       -sfce fails critical errors encountered during file searching<br />       -sicv ignores the CV record when symbol loading<br />       -snul disables automatic symbol loading for unqualified names<br />       -srcpath specifies the source search path<br />       -v enables verbose output from debugger<br />       -wake wakes up a sleeping debugger and exits<br />       -y specifies the symbol search path (see _NT_SYMBOL_PATH)<br />       -z specifies the name of a crash dump file to debug<br />       -zp specifies the name of a page.dmp file<br />                           to use with a crash dump<br />       -remote lets you connect to a debugger session started with -server<br />               must be the first argument if present<br />               transport: tcp | npipe | ssl | spipe | 1394 | com<br />               name: machine name on which the debug server was created<br />               portid: id of the port the debugger server was created on<br />                   for tcp use:  port=<br />                   for npipe use:  pipe=<br />                   for 1394 use:  channel=<br />                   for com use:  port=,baud=,<br />                                 channel=<br />                   for ssl and spipe see the documentation<br />               example: ... -remote npipe:server=yourmachine,pipe=foobar<br />       -server creates a debugger session other people can connect to<br />               must be the first argument if present<br />               transport: tcp | npipe | ssl | spipe | 1394 | com<br />               portid: id of the port remote users can connect to<br />                   for tcp use:  port=<br />                   for npipe use:  pipe=<br />                   for 1394 use:  channel=<br />                   for com use:  port=,baud=,<br />                                 channel=<br />                   for ssl and spipe see the documentation<br />               example: ... -server npipe:pipe=foobar<br />       -premote transport specifies the process server to connect to<br />              transport arguments are given as with remoting</font></p><p><font face="Century Gothic" size="2">Environment Variables:</font></p><p><font face="Century Gothic" size="2">    _NT_SYMBOL_PATH=[Drive:][Path]<br />        Specify symbol image path.</font></p><p><font face="Century Gothic" size="2">    _NT_ALT_SYMBOL_PATH=[Drive:][Path]<br />        Specify an alternate symbol image path.</font></p><p><font face="Century Gothic" size="2">    _NT_DEBUGGER_EXTENSION_PATH=[Drive:][Path]<br />        Specify a path which should be searched first for extensions dlls</font></p><p><font face="Century Gothic" size="2">    _NT_EXECUTABLE_IMAGE_PATH=[Drive:][Path]<br />        Specify executable image path.</font></p><p><font face="Century Gothic" size="2">    _NT_SOURCE_PATH=[Drive:][Path]<br />        Specify source file path.</font></p><p><font face="Century Gothic" size="2">    _NT_DEBUG_LOG_FILE_OPEN=filename<br />        If specified, all output will be written to this file from offset 0.</font></p><p><font face="Century Gothic" size="2">    _NT_DEBUG_LOG_FILE_APPEND=filename<br />        If specified, all output will be APPENDed to this file.</font></p><p><font face="Century Gothic" size="2">    _NT_DEBUG_HISTORY_SIZE=size<br />        Specifies the size of a server's output history in kilobytes</font></p><p><font face="Century Gothic" size="2">Control Keys:</font></p><p><font face="Century Gothic" size="2">     Quit debugger<br />             Break into Target<br />     Force a break into debuggee (same as Ctrl-C)<br />     Debug Current debugger<br />     Toggle Verbose mode<br />     Print version information<br />ntsd: exiting - press enter ---<br /></font></p><!--sp--><div class="relpost"><br/><h3>随机文章：</h3><div><a href="http://sdgsshdshd.blogbus.com/logs/50212385.html">Ugg boots,the Guide of Popular</a> 2009-11-04</div><div><a href="http://sdgsshdshd.blogbus.com/logs/50212361.html">Ugg Classic Tall boots are Perfect for you</a> 2009-11-04</div><div><a href="http://tonyalice.blogbus.com/logs/50211906.html">没事人。一样样儿。</a> 2009-11-04</div><div><a href="/logs/1023076.html">Jsp学习之一：SQLServer2000 JDBC的安装</a> 2005-02-18</div><div><a href="/logs/1021156.html">win2000下apache和tomcat的整合</a> 2005-02-17</div></div><div class="addfav"><br />收藏到：<span class= "delicious"><a href="http://delicious.com/save?url=http%3A%2F%2Flabyrinth.blogbus.com%2Flogs%2F1022898.html&title=%E5%BE%AE%E8%BD%AF%E8%87%AA%E8%BA%AB%E7%9A%84%E6%9D%80%E8%BF%9B%E7%A8%8B%E5%91%BD%E4%BB%A4">Del.icio.us</a></span></div><br /><br /><div class="sysmsg"><b><a href="http://www.blogbus.com" target="_blank">博客大巴，你的个人传媒早班车</a></b></div><br /><br />]]></description>
   <link>http://labyrinth.blogbus.com/logs/1022898.html</link>
   <author></author>
   <pubDate>Fri, 18 Feb 2005 18:18:00 +0800</pubDate>
  </item>
  <item>
   <title>win2000下apache和tomcat的整合</title>
   <description><![CDATA[1、整合理由：<br />单独使用Tomcat做JSP服务器，在工作效率上会有问题，并且所能承受的最大并发连接数也有一定的限制，所以将处理html与jsp进行明确分工，前者交由apache处理，tomcat处理jsp部分，这样各自发挥所长。<br />2、版本：<br />Tomcat 5.0.27 <br />Apache 2.0.50<br />mod_jk2 2.0.4<br />3、软件下载：<br />在<a href="http://httpd.apache.org/">http://httpd.apache.org/</a>上下载apache;<br />在<a href="http://jakarta.apache.org/site/binindex.cgi">http://jakarta.apache.org/site/binindex.cgi</a>上下载Tomcat和mod_jk2。mod_jk2在Tomcat Web Server Connectors中，有两个版本，当然是用最新的。文件很小，所以下载很快；<br />4、软件安装，这个没有什么好说的；<br />5、安装完毕，测试一下，打开<a href="http://localhost:8080">http://localhost:8080</a>和<a href="http://localhost">http://localhost</a>，可以分别看到Tomcat和Apache的本机首页；<br />6、将mod_jk2.so复制到<br />C:\Program Files\Apache Group\Apache2\modules目录下，编辑C:\Program Files\Apache Group\Apache2\conf\httpd.conf文件,在LoadModule那一段代码中添加：<br />LoadModule jk2_module modules/mod_jk2.so<br />7、将AddDefaultCharset ISO-8859-1 改为 AddDefaultCharset GB2312 使Apache自动支持中文显示；<br />8、在“虚拟主机配置代码段”中修改一下：<br />&lt;VirtualHost *:80&gt;<br />    ServerAdmin <a href="mailto:webmaster@dummy-host.example.com">webmaster@dummy-host.example.com</a><br />    DocumentRoot <font color="#ff0000">&quot;C:/Tomcat 5.0/webapps/ROOT&quot;<br /></font>    ServerName dummy-host.example.com<br />    ErrorLog logs/dummy-host.example.com-error_log<br />    CustomLog logs/dummy-host.example.com-access_log common<br />&lt;/VirtualHost&gt;<br />9、编写workers2.properties文件<br />[shm] <br />file=${serverRoot}/logs/shm.file <br />size=1048576 <br />#The socket channel<br />[channel.socket:localhost:8009] <br />port=8009 <br />host=***.***.***.*** <br />#define the worker <br />[ajp13:localhost:8009] <br />channel=channel.socket:localhost:8009 <br />#uri mapping <br />[uri:/*.jsp] <br />worker=ajp13:localhost:8009<br />放到C:\Program Files\Apache Group\Apache2\conf目录下<br />10、重启动Apache和Tomcat服务器，这时<font color="#ff0000">在Apache Service Monitor下的提示栏中可见Apache/2.0.50(win32) mod_jk2/2.0.4</font>；<br />11、分别打开<a href="http://localhost:8080">http://localhost:8080</a>和<a href="http://localhost">http://localhost</a>，看到的都是Apache的页面，打开<a href="http://localhost:8080/index.jsp">http://localhost:8080/index.jsp</a>，看见的都是Tomcat的页面，一切OK！<!--sp--><div class="relpost"><br/><h3>随机文章：</h3><div><a href="http://sdgsshdshd.blogbus.com/logs/50212385.html">Ugg boots,the Guide of Popular</a> 2009-11-04</div><div><a href="http://sdgsshdshd.blogbus.com/logs/50212361.html">Ugg Classic Tall boots are Perfect for you</a> 2009-11-04</div><div><a href="http://tonyalice.blogbus.com/logs/50211906.html">没事人。一样样儿。</a> 2009-11-04</div><div><a href="/logs/1023076.html">Jsp学习之一：SQLServer2000 JDBC的安装</a> 2005-02-18</div><div><a href="/logs/1022898.html">微软自身的杀进程命令</a> 2005-02-18</div></div><div class="addfav"><br />收藏到：<span class= "delicious"><a href="http://delicious.com/save?url=http%3A%2F%2Flabyrinth.blogbus.com%2Flogs%2F1021156.html&title=win2000%E4%B8%8Bapache%E5%92%8Ctomcat%E7%9A%84%E6%95%B4%E5%90%88">Del.icio.us</a></span></div><br /><br /><div class="sysmsg"><b><a href="http://www.blogbus.com" target="_blank">博客大巴，你的个人传媒早班车</a></b></div><br /><br />]]></description>
   <link>http://labyrinth.blogbus.com/logs/1021156.html</link>
   <author></author>
   <pubDate>Thu, 17 Feb 2005 16:13:21 +0800</pubDate>
  </item>
 </channel>
</rss>
