??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美日韩一区不卡,国产成人亚洲欧美,成人av在线一区二区三区http://www.aygfsteel.com/XfoxKing/喜爱Javazh-cnThu, 19 Jun 2025 15:17:14 GMTThu, 19 Jun 2025 15:17:14 GMT60盘安装CentOShttp://www.aygfsteel.com/XfoxKing/archive/2009/11/01/300580.htmlXfoxKingXfoxKingSun, 01 Nov 2009 09:51:00 GMThttp://www.aygfsteel.com/XfoxKing/archive/2009/11/01/300580.htmlhttp://www.aygfsteel.com/XfoxKing/comments/300580.htmlhttp://www.aygfsteel.com/XfoxKing/archive/2009/11/01/300580.html#Feedback0http://www.aygfsteel.com/XfoxKing/comments/commentRss/300580.htmlhttp://www.aygfsteel.com/XfoxKing/services/trackbacks/300580.html      以前倒是蛮崇拜Redhat的,三张盘,M装,不过现在都不支持了。于是寻觅着另一个Linux版本Q找啊找啊,据说CentOSQ现在最新版本是5.4Q貌似刚出来Q用作服务器Q也是十分稳定的Q其效率可以和RedHat一|其实是Redhat的一个社区版本嘛?/font>

Q汗Q一?张CDQ这不是费资源Q浪费精力嘛。那选择DVD版本吧,可是我没d盘,汗,那就选择盘安装吧?/font>

      要从盘启动d有个Grub吧,下一个吧image

 

      要用Grub启动Q先得配|一下,叛_我的电脑->属?>高->启动和故障恢?>~辑

image

是在Windows启动的后面加一?font color="#ff0000">C:\grldr="Grub"C:\grldr="CentOS" Q在安装好之后删除这一即?/font>

      对下载的镜像文g解压image Q我们只是需要其中的一个文件夹image

image

    现在我把q个镜像文g和isolinux文g多w攑֜了F盘(FAT32格式Q?/font>

   解压到C盘的文g中有一个menu.lst文gQ现在需要打开配置一下,在最后一行加?/p>

title CentOS
kernel (hd0,6)/isolinux/vmlinuz
initrd (hd0,6)/isolinux/initrd.img
boot

  因ؓ我的isolinux文g夹在F盘,所以应当是W?个分区,q是很重要的?

  OK重启pȝ可以安装了Q安装的时候选择盘安装Q其他都一栗?/p>

Screenshot

如果不会可以再次参考一下三文章啰

CentOS盘安装Ҏ

实战 CentOS 盘安装

盘安装CentOS 5.2



XfoxKing 2009-11-01 17:51 发表评论
]]>
2009q?0?22日ȝhttp://www.aygfsteel.com/XfoxKing/archive/2009/10/31/300482.htmlXfoxKingXfoxKingSat, 31 Oct 2009 06:55:00 GMThttp://www.aygfsteel.com/XfoxKing/archive/2009/10/31/300482.htmlhttp://www.aygfsteel.com/XfoxKing/comments/300482.htmlhttp://www.aygfsteel.com/XfoxKing/archive/2009/10/31/300482.html#Feedback0http://www.aygfsteel.com/XfoxKing/comments/commentRss/300482.htmlhttp://www.aygfsteel.com/XfoxKing/services/trackbacks/300482.html

 

一、本周主要学习情?/font>

?32出来Q我曾想q?条\。首先,.NETq一块是不能搞了Q我不能把团队积累的东西拿出ȝl做我的目Q我现在的可以从PHP和JSP入手Q通过PHPd些小的CMSQ以后通过J2EE做比较大型的目。在此过E中Q我搭PHP环境有了2天,搭JSP环境用了2天,我体会到?NET实是比较容易入手的Q适合初学者。第二条路是Q接下来的日子,没有班主ȝ帮助Q我可能很难ȝ正的做项目,我的唯一\是考研Q我一直没有选择q条路的原因是因为我觉得q很可能是从一个火坑蟩C另一个火坑(我觉得本校的学习气氛M上还是不怎么LQ。思烦后,觉得q条路是可以试的,也是值得试的?/font>

有一U思想很重要。在q去232的日子,我学到最受益的应当是沈老师教导的一U思想?NET中的三次架构通过把系l分成UI、BLL、DAL实现了“高内聚、低耦合”的思想Q这U东西其实对以以后的扩展时很方便的,我在Java中也扑ֈ了UI、BIZ、DAO的分层结构,q当中的思想几乎是无变化的?NET中通过代码生成器徏立一些ModelQ或者说是NHibernateQ这个东西当初只知道什么ORM思想的,不过通过Java中的HibernateQ我有了重新的认识?/font>

有的东西q是需要知道的。沈老师说过Q我们做的不是实验室产品Q我们应当不仅知道怎么用这些东西,q要知道q些东西是怎么实现的?NET通过装一些东西,使得~程变的是一件极其容易的事(有些控g的实玎ͼ其效率可能是很低的)Q我觉得q是.NET一个好的方面,也是一个坏的方面,我们无法L其具体实现。在Java中,我是可以接触低层~码的,我JSP的页面其实是建立在Servlet的基之上Q而Servlet其实是一个Javac,只是q个cL较特D。Q何页面,通过~译之后Q就是一?class文gQ这个就昑־很直白了QQ何一张页面就是一个类。然后,q有一Ҏ较感慨,?NET中我到现在ؓ止无法知道哪个方法对Post或Get表单p处理Q而Java中可以通过重蝲一个Servletcd现对表单不同提交方式的处理。还有就是,接触Java后,我对于HTTP传输有了更进一步的认识Q我完全可以~写一个报_搞个cM于cotent="test/html;charset=GBK"的东西,其传输协议的报头和控制信息我是完全可以操控的Q整张页面可以通过一个ServletcM写(q里我也认识C沈老师Z么会把一些HTML代码装在C#cM的原因,我当初还以ؓq是一U不爱好的行为,他把UI和BLL混了Q?/font>

其实q_无所谓。如果真的做目Q我l不会选择去重新构建form提交的一些方法,有些东西应当是封装的Q这里就是一个积累的问题了,而且q是一个非帔R要的斚wQ必认真切实的做。实际开发中Q我们应该选择比较高的东西,不过Q我始终觉得对于一些低层东西的了解q是蛮重要的。做项目,LAMP是一U不错的选择Q主^台还是属?NET和J2EE吧?/font>

有的时候把道理讲清楚很重要。我曑֝定的认ؓ数据程囑֒数据图q类q程化得东西是不可以随便抛弃的,不能_我们现在用了面向对象的方法,一切过E化的东西就要全部抛弃。后来我逐渐理解Q现实中Q类q种东西实是极其稳定的Q而对象是可变的,面向对象的方法是合适的Q还有很多方面有优势呢)。然后,我觉得一个数据流E图同样可以把一个东西的操作q程全部描述清楚Q我有何必舍弃这个而去用UML中的zd囑֑Q后来,沈老师提到了一个用户交互的问题Q我l于发现数据程囄实无法实玎ͼq有很多优点{待我去发现Q。我d232重要是和沈老师思想上有些冲H,我绝无理由去怀疑沈老师技术上是NB的,不过有些x实和我想的不一P可能我比较怪吧Q我觉得有些东西是要商量的,有些东西也是要看个h意愿的)?/font>

二、下周学习计?/font>

    现在我已l把一个OJ的系l搭h了,我也{应了王老师把这个OJ完善一下,下一步我会把OJ的有些东西反~译一下,然后我想把这个OJ的内核提出来也不是很困难的事Q我会把q个OJ的内核提出来Q最后我也会整一个Discuz PHP的论坛,最后把q一套系l作为我的毕业设计(如果考研的话Q这也是我唯一的选择了)。另外有一个还是比较重要的东西Q可能对我来说也无所谓,是要好好准备一下Y考(零星地看q,貌似我想好好复习Q。有的时候想x谓的证书是没用的Q大胆的喊一声“我的能力不需要Q何证书来体现”?/font>

三?/font>学习中有何徏议,q有何困N要解x支持?/font>

困难Q?/font>HTML最基础Q我需要。我以前认ؓq种东西是界面设计h员的事情Q我是挺不情愿的dq种事的Q尽沈老师说过多次Q,要运用ServletQ你必须掌握HTML界面布局?/font>

Q?/font>作ؓ一个团队,团结是很重要的,所谓的要做团队贡献q不是谁说了,q种东西应当更多的是从责d发,Q给我的感觉是大家都是出来LQ我们现在在同一个团队,Z么我们不团结在一起做一番事业呢Q)。还有一点,我觉得团队成员之间的交流时很重要的,不仅仅是技术上的(我们的定位绝不是E序员,我们需要的是工E师Q?/font>

                                                             2009-10-17



XfoxKing 2009-10-31 14:55 发表评论
]]>
JDK环境配置http://www.aygfsteel.com/XfoxKing/archive/2009/10/27/299913.htmlXfoxKingXfoxKingTue, 27 Oct 2009 05:11:00 GMThttp://www.aygfsteel.com/XfoxKing/archive/2009/10/27/299913.htmlhttp://www.aygfsteel.com/XfoxKing/comments/299913.htmlhttp://www.aygfsteel.com/XfoxKing/archive/2009/10/27/299913.html#Feedback0http://www.aygfsteel.com/XfoxKing/comments/commentRss/299913.htmlhttp://www.aygfsteel.com/XfoxKing/services/trackbacks/299913.htmlimage也就是说我的JDK安装在了C:\Java\JDK目录下,右键“我的电脑?>属?>高->环境变量,在系l变量选择“新建”,如下d变量

image然后扑ֈpathQ选择~辑Q添加内?%java_home%\bin;%java_home%\jre\bin

image

q里?java_home%其实是上面java_home的一个替代品Q当然也可以自己?/p>

C:\Java\JDK\bin{东西啦

最后还要添加一个很重要的classpath变量Q其gؓ

.;%java_home%\lib;%java_home%\lib\tools.jar

q个.代表当前目录

 

image

配置完成之后用测试一?/p>

image



XfoxKing 2009-10-27 13:11 发表评论
]]>
Servlet最基础知识http://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299826.htmlXfoxKingXfoxKingMon, 26 Oct 2009 10:53:00 GMThttp://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299826.htmlhttp://www.aygfsteel.com/XfoxKing/comments/299826.htmlhttp://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299826.html#Feedback0http://www.aygfsteel.com/XfoxKing/comments/commentRss/299826.htmlhttp://www.aygfsteel.com/XfoxKing/services/trackbacks/299826.htmlServlet在JSP中是一个很重要的东ѝServlet是服务器应用程序,用了完成在B/S架构下,客户h的响应。Servlet写好的类必须部v在一个Servlet容器中才能运行?/p>

image

如果说我~译得到一个Servlet的class文gQ?font color="#000000">其内容书写如?/font>

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.omg.CORBA.Request;


public class MyServlet extends HttpServlet{

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		PrintWriter out =  resp.getWriter();
		out.println("<font color=red>I'm a Servlet</font>");
		out.flush();
		out.close();
		/*通过TomcatQ不需要徏立Socket
		 * */
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

}

 

其攑֜Tomcat 6.0\webapps\MyJSP\WEB-INF\classes文g下,

image

现在的Q务是q样通过览器访问到q个ServletE序呢,查看WebRoot下的web.xml文g

image

web.xml文g内容如下

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee >

。。。。?/p>

</web-app>
现在Z与其兌我需要添?条语?/span>
<servlet>
  <servlet-name>MyServletxx</servlet-name>
  <servlet-class>MyServlet</servlet-class>
</servlet>

W一行可以选一个名字,不过接下来一D늚名称必须与其相同Q第二行卌个ServletcȝcdQ在加以下内?/font>

<servlet-mapping>
    <servlet-name>MyServletxx</servlet-name>
    <!-- ervlet -->
    <url-pattern>/MyServlet</url-pattern>
  </servlet-mapping>
q个名字必须与前面的相同Q第二个指明了访问\径,如果我这样写了,可以在浏览器中输入以下内容访?/span>
http://localhost:8080/MyJSP/MyServlet
OK
image 


XfoxKing 2009-10-26 18:53 发表评论
]]>
[Java]HTTPhhttp://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299811.htmlXfoxKingXfoxKingMon, 26 Oct 2009 08:58:00 GMThttp://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299811.htmlhttp://www.aygfsteel.com/XfoxKing/comments/299811.htmlhttp://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299811.html#Feedback0http://www.aygfsteel.com/XfoxKing/comments/commentRss/299811.htmlhttp://www.aygfsteel.com/XfoxKing/services/trackbacks/299811.htmlhttp://localhost:80中读取网内容,整个是以HTML源文件显C,通过本程序对HTTPh有了一点了?/font>

import java.net.Socket;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;


public class Main {


	public static void main(String[] args) throws Exception {
		//建立一个到服务器的Socketq接
		Socket s = new Socket("127.0.0.1", 80);
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));
		bw.write("GET/HTTP/1.1");
		bw.newLine();
		bw.write("Host:127.0.0.1:80");
		bw.write("Content-Type:text/html");
		bw.newLine();
		bw.newLine();
		bw.flush();
		BufferedReader br = new BufferedReader(new InputStreamReader(s.getInputStream()));
		String str = null;
		while((str = br.readLine()) != null)
		{
			System.out.println(str);
		}
		bw.close();
		br.close();
		s.close();
	}

}


XfoxKing 2009-10-26 16:58 发表评论
]]>
Windows Live Writer代码语法高亮插ghttp://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299724.htmlXfoxKingXfoxKingSun, 25 Oct 2009 23:41:00 GMThttp://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299724.htmlhttp://www.aygfsteel.com/XfoxKing/comments/299724.htmlhttp://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299724.html#Feedback0http://www.aygfsteel.com/XfoxKing/comments/commentRss/299724.htmlhttp://www.aygfsteel.com/XfoxKing/services/trackbacks/299724.html插g1Q?a target="_blank">Insert_Code_for_Windows_Live_Writer.msi

首先下蝲安装文gimage Q安装之后在Windows Live Writer中将昄如下图标Q?a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/WindowsLiveWriter_8411/image_5.png">image Q?/p>

插入效果如下Q?/p>

image

插g2Q?a >CodePaste-v1.0.3345.rar

先下载该文g的dllQ?a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/WindowsLiveWriter_8411/image_9.png">image 然后复制到Live Writer安装目录的Plugins文g夹下卛_Q效果如?/p>

image

插g3Q?a >SyntaxHighlight.rar

下蝲插gQ同栯压到Plugins目录下即可,效果如下Q?/p>

image

	public static void main(String[] args) throws SQLException {
		//1.注册MySql驱动
		try {
			Class.forName("com.mysql.jdbc.Driver");
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

插g4Q?a target="_blank">Paste from Visual Studio

专门用于VS代码的粘?/p>

image



XfoxKing 2009-10-26 07:41 发表评论
]]>
MyEclipse中Hibernate的一些?/title><link>http://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299723.html</link><dc:creator>XfoxKing</dc:creator><author>XfoxKing</author><pubDate>Sun, 25 Oct 2009 23:37:00 GMT</pubDate><guid>http://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299723.html</guid><wfw:comment>http://www.aygfsteel.com/XfoxKing/comments/299723.html</wfw:comment><comments>http://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299723.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/XfoxKing/comments/commentRss/299723.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/XfoxKing/services/trackbacks/299723.html</trackback:ping><description><![CDATA[<p>选择D菜单,MyEclipse ?gt; Project Capabilities ?gt; Add Hibernate Capabilities?/p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_2.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="393" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_thumb.png" width="397" border="0"></a></p> <p>Z以后能独立运行,修改一下JAE Library Installation</p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_4.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="135" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_thumb_1.png" width="331" border="0"></a> </p> <p>Hibernate有全局的配|文件hibernate.cfg.xmlQ现在需要做一下配|?/p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_6.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="419" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_thumb_2.png" width="420" border="0"></a> </p> <p>下一步需要注意的是对&字符q行转义</p> <p><a title="jdbc:mysql://localhost:3306/studio?useUnicode=true&amp;characterEncoding=GBK" href="www.cnblogs.com/Xredman">jdbc:mysql://localhost:3306/studio?useUnicode=true&amp;characterEncoding=GBK</a></p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_8.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="422" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_thumb_3.png" width="431" border="0"></a> </p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_10.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="391" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_thumb_4.png" width="430" border="0"></a> </p> <p>OkQ创建完成,看一下配|的东西?/p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_12.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="421" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_thumb_5.png" width="535" border="0"></a> </p> <p>接下来是Hibernate的具体用,看一下所谓的反向工程吧。。。?/p> <p>单击右键在需要用Hibernate的表|选择Hibernate Reverse EngineeringQ?/p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_14.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="475" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_thumb_6.png" width="457" border="0"></a> </p> <p>现在对其做一下设|,最l如?/p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_16.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="449" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_thumb_7.png" width="459" border="0"></a> </p> <p>下一?/p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_18.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="435" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_thumb_8.png" width="468" border="0"></a> </p> <p>再下一?/p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_20.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="411" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_thumb_9.png" width="473" border="0"></a> </p> <p>看一下生成的文g?/p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_22.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="195" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseHibernate_96C1/image_thumb_10.png" width="224" border="0"></a> </p> <p>现在用Hibernateq行一些编E测试吧</p><pre><span style="color: #0000ff">import</span> java.util.*; <span style="color: #0000ff">import</span> java.sql.*; <span style="color: #0000ff">import</span> org.hibernate.Transaction; <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> Main { <span style="color: #008000">/** * * @param args */</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> main(String[] args) { <span style="color: #008000">//插入数据</span> <span style="color: #008000">//1.实例化DAO</span> EchoUserLoginDAO dao = <span style="color: #0000ff">new</span> EchoUserLoginDAO(); <span style="color: #008000">//2.打开transaction</span> Transaction tran = dao.getSession().beginTransaction(); <span style="color: #008000">//3.生Javac?/span> EchoUserLogin userlogin = <span style="color: #0000ff">new</span> EchoUserLogin(); <span style="color: #008000">//4.讄属?/span> userlogin.setPassWord("<span style="color: #8b0000">xx</span>"); userlogin.setUserName("<span style="color: #8b0000">yy</span>"); <span style="color: #008000">//5.保存</span> dao.save(userlogin); <span style="color: #008000">//6.提交事务</span> tran.commit(); <span style="color: #008000">//7.d数据</span> java.util.List<EchoUserLogin> result = dao.findAll(); <span style="color: #008000">//8.列出列表中的所有数?/span> <span style="color: #0000ff">for</span>(EchoUserLogin o:result){ System.out.println(o.getUserName()); System.out.println(o.getPassWord()); } dao.getSession().close(); } } </pre><img src ="http://www.aygfsteel.com/XfoxKing/aggbug/299723.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/XfoxKing/" target="_blank">XfoxKing</a> 2009-10-26 07:37 <a href="http://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299723.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MyEclipse Database Explorer的?/title><link>http://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299722.html</link><dc:creator>XfoxKing</dc:creator><author>XfoxKing</author><pubDate>Sun, 25 Oct 2009 23:36:00 GMT</pubDate><guid>http://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299722.html</guid><wfw:comment>http://www.aygfsteel.com/XfoxKing/comments/299722.html</wfw:comment><comments>http://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299722.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/XfoxKing/comments/commentRss/299722.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/XfoxKing/services/trackbacks/299722.html</trackback:ping><description><![CDATA[<p>首先d换到MyEclipse Database Explorer视图?/p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseDatabaseExplorer_908E/image_2.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="226" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseDatabaseExplorer_908E/image_thumb.png" width="244" border="0"></a> </p> <p>新徏一个数据库q接驱动</p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseDatabaseExplorer_908E/image_4.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="460" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseDatabaseExplorer_908E/image_thumb_1.png" width="431" border="0"></a> </p> <p>OKQ测试一下,q接成功</p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseDatabaseExplorer_908E/image_6.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="325" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/MyEclipseDatabaseExplorer_908E/image_thumb_2.png" width="306" border="0"></a></p><img src ="http://www.aygfsteel.com/XfoxKing/aggbug/299722.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/XfoxKing/" target="_blank">XfoxKing</a> 2009-10-26 07:36 <a href="http://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299722.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JSP中对文gdhttp://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299720.htmlXfoxKingXfoxKingSun, 25 Oct 2009 23:35:00 GMThttp://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299720.htmlhttp://www.aygfsteel.com/XfoxKing/comments/299720.htmlhttp://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299720.html#Feedback0http://www.aygfsteel.com/XfoxKing/comments/commentRss/299720.htmlhttp://www.aygfsteel.com/XfoxKing/services/trackbacks/299720.html <%! int num = 0; File file = new File("count.txt"); synchronized void Count() {//计算讉Kơ数的同步方?/span> if(!file.exists()) { num++; try { file.createNewFile(); FileOutputStream out = new FileOutputStream("count.txt"); DataOutputStream dataOut = new DataOutputStream(out); dataOut.write(num); out.close(); dataOut.close(); } catch(IOException ee) { } } else { try { FileInputStream in = new FileInputStream("count.txt"); DataInputStream dataIn = new DataInputStream(in); num = dataIn.readInt(); num++; in.close(); dataIn.close(); FileOutputStream out = new FileOutputStream("count.txt"); DataOutputStream dataOut = new DataOutputStream(out); dataOut.writeInt(num); out.close(); dataOut.close(); } catch(IOException ee) { } } } %> <% Count(); %> 你是W?lt;%= num %>讉K的h。。?/pre>

XfoxKing 2009-10-26 07:35 发表评论
]]>
JSPq接数据?/title><link>http://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299721.html</link><dc:creator>XfoxKing</dc:creator><author>XfoxKing</author><pubDate>Sun, 25 Oct 2009 23:35:00 GMT</pubDate><guid>http://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299721.html</guid><wfw:comment>http://www.aygfsteel.com/XfoxKing/comments/299721.html</wfw:comment><comments>http://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299721.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/XfoxKing/comments/commentRss/299721.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/XfoxKing/services/trackbacks/299721.html</trackback:ping><description><![CDATA[<p><font face="新宋?>JSP中连接数据库需要一个jar包,我现在用的?/font></p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/JSP_865A/image_4.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="131" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/JSP_865A/image_thumb_1.png" width="140" border="0"></a> </p> <p>可以下蝲不同版本Q也可以直接从我的网盘中下蝲Q?a >mysql-connector-java-3.1.11-bin.jar</a></p> <p>接下来将jar包加载上d。。?/p> <p><a href="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/JSP_865A/image_6.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="119" alt="image" src="http://www.aygfsteel.com/images/blogjava_net/XfoxKing/WindowsLiveWriter/JSP_865A/image_thumb_2.png" width="201" border="0"></a> </p> <p>具体实现的代码很Ҏ看懂Q不再多费话了,以下是我的代码实?/p><pre><span style="color: #0000ff">import</span> java.util.*; <span style="color: #0000ff">import</span> java.sql.*; <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> Main { <span style="color: #008000">/** * * @param args * @throws SQLException */</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> main(String[] args) <span style="color: #0000ff">throws</span> SQLException { <span style="color: #008000">//1.注册MySql驱动</span> <span style="color: #0000ff">try</span> { Class.forName("<span style="color: #8b0000">com.mysql.jdbc.Driver</span>"); } <span style="color: #0000ff">catch</span> (ClassNotFoundException e) { <span style="color: #008000">// TODO Auto-generated catch block</span> e.printStackTrace(); } <span style="color: #008000">//2.获取数据库的链接</span> java.sql.Connection conn = java.sql.DriverManager.getConnection( "<span style="color: #8b0000">jdbc:mysql://localhost/studio?useUnicode=true&characterEncoding=GBK</span>", "<span style="color: #8b0000">root</span>", "<span style="color: #8b0000">admin</span>"); <span style="color: #008000">//3.获取表达?/span> java.sql.Statement stmt = conn.createStatement(); <span style="color: #008000">//4.执行SQL</span> java.sql.ResultSet rs = stmt.executeQuery("<span style="color: #8b0000">select * from UserLogin</span>"); <span style="color: #008000">//5.昄l果集里的数?/span> <span style="color: #0000ff">while</span>(rs.next()){ System.out.println(rs.getInt(1)); System.out.println(rs.getString("<span style="color: #8b0000">UserName</span>")); System.out.println(rs.getString("<span style="color: #8b0000">Password</span>")); } <span style="color: #008000">//6.释放资源</span> rs.close(); stmt.close(); conn.close(); } } </pre><img src ="http://www.aygfsteel.com/XfoxKing/aggbug/299721.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/XfoxKing/" target="_blank">XfoxKing</a> 2009-10-26 07:35 <a href="http://www.aygfsteel.com/XfoxKing/archive/2009/10/26/299721.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank">ˮ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ԣ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">°Ͷ</a>| <a href="http://" target="_blank">㰲</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͨ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ԭ</a>| <a href="http://" target="_blank">̶</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ľ</a>| <a href="http://" target="_blank">°Ͷ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">пǰ</a>| <a href="http://" target="_blank">ɼ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ϋ</a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ij</a>| <a href="http://" target="_blank">Ҷ</a>| <a href="http://" target="_blank"> </a>| <a href="http://" target="_blank">ʶ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">书</a>| <a href="http://" target="_blank">¹</a>| <a href="http://" target="_blank">ֶ</a>| <a href="http://" target="_blank">ػ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ҫ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>