dnf卖dnf川一土豪70级尊1天空红眼只要567大洋 http://www.pa…

  2. Java的接口和C++的虚类的相同和不同处。
  由于Java不支持多继承,而有可能某个类或对象要使用分别在几个类或对象里面的方法或属性,现有的单继承机制就不能满足要求。与继承相比,接口有更高的灵活性,因为接口中没有任何实现代码。当一个类实现了接口以后,该类要实现接口里面所有的方法和属性,接口里面的属性在默认状态下面都是public static,所有方法默认情况下是public.一个类可以实现多个接口。
  3. 垃圾回收的优点和原理。并考虑2种回收机制。
  Java语言中一个显著的特点就是引入了垃圾回收机制,使c++程序员最头疼的内存的问题迎刃而解,它使得Java程序员在编写程序的时候不再需要考虑内存管理。由于有个垃圾回收机制,Java中的对象不再有“作用域”的概念,只有对象的引用才有“作用域”。垃圾回收可以有效的防止内存泄露,有效的使用可以使用的内存。垃圾回收器通常是作为一个单独的低级别的线程运行,不可预知的情况下对内存堆中已经死亡的或者长时间没有使用的对象进行清除和回收,程序员不能实时的调用垃圾回收器对某个对象或所有对象进行垃圾回收。回收机制有分代复制垃圾回收和标记垃圾回收,增量垃圾回收。
  4.线程同步的方法。
  wait():使一个线程处于等待状态,并且释放所持有的对象的lock。
  sleep():使一个正在运行的线程处于睡眠状态,是一个静态方法,调用此方法要捕捉InterruptedException异常。
  notify():唤醒一个处于等待状态的线程,注意的是在调用此方法的时候,并不能确切地唤醒某一个等待状态的线程,而是由JVM确定唤醒哪个线程,而且不是按优先级。
  Allnotity():唤醒所有处入等待状态的线程,注意并不是给所有唤醒线程一个对象的锁,而是让它们竞争。
  5. Error与Exception有什么区别?
  Error表示系统级的错误和程序不必处理的异常,
  Exception表示需要捕捉或者需要程序进行处理的异常。
  6. 在java中一个类被声明为final类型,表示了什么意思?
  表示该类不能被继承,是顶级类。
  7. heap和stack有什么区别。
  栈是一种线形集合,其添加和删除元素的操作应在同一段完成。栈按照后进先出的方式进行处理。堆是栈的一个组成元素。
  8. 谈谈final, finally, finalize的区别。
  final—修饰符(关键字)如果一个类被声明为final,意味着它不能再派生出新的子类,不能作为父类被继承。因此一个类不能既被声明为 abstract的,又被声明为final的。将变量或方法声明为final,可以保证它们在使用中不被改变。被声明为final的变量必须在声明时给定初值,而在以后的引用中只能读取,不可修改。被声明为final的方法也同样只能使用,不能重载。
  finally—异常处理时提供 finally 块来执行任何清除操作。如果抛出一个异常,那么相匹配的 catch 子句就会执行,然后控制就会进入 finally 块(如果有的话)。
  finalize—方法名。Java 技术允许使用 finalize() 方法在垃圾收集器将对象从内存中清除出去之前做必要的清理工作。这个方法是由垃圾收集器在确定这个对象没有被引用时对这个对象调用的。它是在 Object类中定义的,因此所有的类都继承了它。子类覆盖 finalize() 方法以整理系统资源或者执行其他清理工作。finalize() 方法是在垃圾收集器删除对象之前对这个对象调用的。
  9. Anonymous Inner Class (匿名内部类)
  是否可以extends(继承)其它类,是否可以implements(实现)interface(接口)?
  匿名的内部类是没有名字的内部类。不能extends(继承) 其它类,但一个内部类可以作为一个接口,由另一个内部类实现。
  10. Static Nested Class 和 Inner Class的不同
  Nested Class (一般是C++的说法),Inner Class (一般是JAVA的说法)。Java内部类与C++嵌套类最大的不同就在于是否有指向外部的引用上。
  注: 静态内部类(Inner Class)意味着1创建一个static内部类的对象,不需要一个外部类对象,2不能从一个static内部类的一个对象访问一个外部类对象。
今日做网站,对js& div+css等小有感冒
1.首页flash图片轮播源文件
2.图片局部放大
3.Tab内容切换
4.Jquery报纸特效
<span style="color: #&a&href="#"&onclick="this.style.behavior='url(#default#homepage)';this.setHomePage(chenglu.blogjava.net)"&&&&font&color="#FFFFFF"&设为首页&&/font&&&/a&&
<span style="color: #&a&href="#"&onClick="window.external.AddFavorite(document.location.href,'Javazhai)"&onmousemove="status='收藏本页';"&onmouseout="status='';"&&&font&color="#FFFFFF"&加入收藏夹&&/font&&&/a&
一个人如果不懂得处世的艺术,尤其是处世没有一点&#8220;心机&#8221;,是无法获得成功的。要处理好与同事、朋友、家人等一切社会关系,在如今越来越复杂的社会里,要想更好地生存和发展,必须要学会处世之道。处世厚黑学是一种智慧和谋略,是助我们通往成功之路的向导。
1、要懂得适度伪装自己,不能太单纯。
要想保护自己,发展自己,要懂得适度伪装自己。
2、做人要留退路,留余地。
做人难,难做人。很多时候,不仅要给别人留有余地,还要给自己铺个台阶。
3、嘴不遮掩难成大事。
有些人话说得绝对,信誓旦旦,又嘴不遮掩,处处许诺,结果能做到的很少,泡汤的很多,最终累得自己半死,还遭人讨厌,真是得力不讨好,费心还伤神。
4、成熟而不世故。
成熟的人,做人沉着稳当,人人想与之交往,这样的人在社会上做人也左右逢源,如鱼得水;而世故的人,本以为占了便宜,把社会上各种算计运用得自以为是,结果,人人对你敬而远之。
5、想得开活得不累。
宠辱不惊,看庭前花开花落;去留无意,望天上云卷云舒。心态决定一切,有好的心态就活得潇洒不累。
6、没事不惹事,来事不怕事。
一般来说,自然形成的都是圆的,人为修饰的都是方的,因此,方为动,圆为静,方是原则,圆是机变,方是以不变应万变,圆是以万变应不变。外表要圆(大智若愚),内心要方(清静明志),对己要方(严以律己),对人要圆(宽以待人)。
7、防挨朋友刀。
处世最怕的是挨朋友插的刀。因为是朋友,你不注意他,因为是朋友,你不防范他,因为是朋友,他了解你的肢体命脉,所以给你那一刀插得最深,因为是朋友,他才会真懂得背后下手。
8、用势利眼寻找可靠伙伴。
有点势利眼可谓是善识时务,不懂得势利的人,只能说自欺欺人,表面哽气,其实糊涂。人生当中,免不了与他人合作,有&#8220;势利眼&#8221;的人,能选择高能耐有前途的人,自己自然也沾光。
9、放下面子来做人。
只要脸不太厚,心不太黑,做人就能做得完善,做事就能做得完美。
&&&& 摘要: 源代码以及下载&&
&&&& 摘要: 小省小市小学校 大一小菜鸟的一个小小的课程设计&&
今日研究NetBeans欲完成课程设计学生管理系统,
突然发现不会连接数据库了&#8230;&#8230;
思索中,用jsp的方法去test了一下,感觉&#8230;&#8230;对啊,老师曾经讲过这个跟jsp链接数据库是一样的,巨汗&#8230;&#8230; =_=!
Class.forName&#8230;&#8230;&#8230;
con&#8230;&#8230;&#8230;..
stm&#8230;&#8230;&#8230;..
——运行——报错(ClassNotFoundException)——添加库MySQL-JDBC
应该没错了吧,但是&#8230;&#8230;
SQLException: No suitable driver for mysql://localhost:3306/stu
而后发现了一个很耻辱的问题:
con = DriverManager.getConnection("mysql://localhost:3306/stu","&#215;","&#215;");
天啊,mysql://localhost:3306/stu,我竟然忘记写 jdbc在mysql前面!~~
&--------------------------------------------------------
中国移动老总上公厕,守门大爷说:进去3毛,出来2毛。
&& 老总一愣说:出来还收费?大爷说:学习移动,双向收费。
&& 老总从厕所出来又被拦住:你蹲的是8号坑,交1元钱的选号费,放了一个屁,交1元的漫游费,超过3分钟,再交1元的超时费。
&& 厕所有背景音乐,收彩铃费2毛。
&& 大爷劝老总,如果你经常光顾,还是办个厕所套餐比较合算。
&& 老总大怒:这是那家的王法!大爷一摆手:动感地带,我的地盘我做主!
&& 祝大家端午节开心
Problem A: University Time Limit: 1000MSMemory Limit: 65536K Total Submissions: 726Accepted: 422 Description 企鹅大学有很多很多名学生,课程也很多。譬如企鹅语,北极熊语,企鹅初级数学,企鹅高级数学等等等等&#8230;&#8230; 现在,企鹅大学的校长想请你为他们写一个程序:计算总分的程序。请你由他们输入课程的数量以及一个学生每门课程的分数,输出该学生的总分。
Input 第一行:一个整数n(1 &#8804; n &#),代表企鹅大学的课程数目。第2至第n+1行:每行有一个1整数,第i+1行代表某一位学生在第i门课上取得的分数。分数为0到100的整数。 Output 一个整数。代表该学生在n门课中所得的总分。 Sample Input3
Sample Output299&
Problem B: Doudou
Time Limit: 1000MSMemory Limit: 65536K
Total Submissions: 323Accepted: 75
Description
有只企鹅叫豆豆,总是被别的企鹅欺负。豆豆在长期的隐忍之后,掌握了所有企鹅的高度和攻击力强度,还得到了一把黄金剑。在拥有了黄金剑以后,豆豆终于可以展开绝地大反击。但这把黄金剑的用法却很奇怪。
首先,豆豆第一次可以选择任何一只企鹅开始挑战。豆豆这一次必胜。
再次,当豆豆已经挑战过某一只企鹅后,再下一次的挑战对象只能是比上一名对手高,且比上一名对手攻击力强的企鹅。这样豆豆必胜。否则黄金剑会觉得打的没意思而故意发脾气输掉。豆豆还会被大家集体暴打。
面对着这把脾气很大的黄金剑,豆豆想请你帮助他计算一下,他最多可以连续击败多少只企鹅?
第一行:一个数据n,代表企鹅群里除了豆豆一共有n(1 &#8804; n &#)只企鹅。第2至第n+1行:每行2个数字。第i+1行的第一个数字为企鹅i的高度。第i+1行的第二个数字为企鹅i的攻击力。0 &#8804; 高度,攻击力 &#,000。
一个数。代表豆豆最多可以连续击败的企鹅数。
Sample InputSample Input #1Sample Input #231 33 22 4510 19 27 36 45 5
Sample OutputSample Output #1Sample Output #221
Problem C: Ball
Time Limit: 1000MSMemory Limit: 65536K
Total Submissions: 6Accepted: 0
Description
给出空间上两个运动的小球,球心坐标在分别是A(xa , ya , 0),B(xb , yb , 0),半径分别为Ra , Rb,速度分别为Va( vax, vay , 0), Vb( vbx , vby, 0)。判断两个小球是否会碰撞,若会碰撞, 输出首次碰撞时的时刻和两个小球的坐标;若不会碰撞,输出&#8220;Impossible&#8221;(球心和速度的z坐标恒为0,可将本题视为只是平面上的运动。初始时刻为0,若初始时刻小球贴在一起,视为首次碰撞)。
第一行:一个整数T,(T &#8804; 30),表示下面有T组数据。接下来,每两行组成一组数据,首行包含5个实数,用空格隔开,依次是xa , ya , vax, vay , Ra,下面一行也包含5个实数,依次是xa , ya , vbx , vby, Rb。每组数据之间有一个空行。
对于每组数据,如果两个小球会碰撞,输出首次碰撞时的时刻t,和两个小球的坐标xap , yap , xbp , ybp ,用空格隔开,保留三位小数。如果不能,输出&#8220;Impossible&#8221;。
Sample Input3
100 200 0 0 55
100 100 0 0 45
131 123 45 2 43
454 230 0 -5 35
100 100 1 1 31
200 200 2 2 23
Sample Output0.000 100.000 200.000 100.000 100.000
6.179 409.053 135.358 454.000 199.105
Impossible
Problem D: String
Time Limit: 1000MSMemory Limit: 65536K
Total Submissions: 14Accepted: 0
Description
给定一个字符串S[1..n]和一个整数T,现在需要在字符串S中找出长度不小于T的一个子串,使得其在原串中不重叠出现的次数最多,求这个次数。
第一行:一个整数T(T & 1)第二行:一个字符串S,且仅包含小写字母,字符串长度不超过10000
一个整数。代表出现最多的次数
Sample Input2
Sample Output3
Problem E: Papercut
Time Limit: 1000MSMemory Limit: 65536K
Total Submissions: 3Accepted: 0
Description
现在桌面上有一张矩形纸,上边有n&#215;m个格子,每个格子有一个数字。 每张矩形纸可以算出一个数值F,F是由纸张里任意两个不同的格子里的数字相乘之和。如果该纸只有一个格子,那么F=0。
剪纸规则是:1、沿格子边缘一直剪成两个矩形纸,每张纸里必须有数字。2、每次剪纸在桌面上任意选一张矩形纸,进行1操作,再把剪出来的两张纸放到桌面。
现在你可以对桌面上的纸最多剪k次,问最后桌面上所有矩形纸的F值之和最小是多少?
1 &#8804; n &#8804; 101 &#8804; m &#8804; 101 &#8804; k &#8804; 50
第一行:3个整数n, m, k接下来n行:每行m个正整数,范围在[1,10],第i行第j个数表示当前桌面那张矩形纸里边第i行第j个格子里的数字。
一个整数。代表最小F值和。
Sample InputSample Input #1Sample Input #24 4 41 1 1 11 1 1 11 1 1 11 1 1 1 10 10 54 2 3 5 6 10 1 6 5 8 3 6 9 1 7 10 7 10 8 1 7 8 3 3 2 5 9 9 8 2 5 5 9 9 3 10 2 9 10 2 1 1 6 7 6 8 3 9 6 8 7 1 2 5 3 2 3 7 8 10 10 9 8 9 7 8 10 7 3 9 6 3 6 2 1 7 10 6 7 2 2 4 8 4 5 9 10 5 9 10 7 4 3 2 4 9 9 9 8 1
Sample OutputSample Output #1Sample Output #21826612
Sample 1说明: 按照下面方式剪纸4次1&& 1&& 1&& 1-------------1 | 1 | 1 | 1&& |&& |&& | 1 | 1 | 1 | 1&& |&& |&& | 1 | 1 | 1 | 1得到6+3+3+3+3=18
&script language="javascript"&function checkForm(form){&&& if(isEmpty(form.uid.value)||isEmpty(form.password.value)||isEmpty(form.confirmPassword.value)||isEmpty(form.email.value)||isEmpty(form.quesstion.value)||isEmpty(form.answer.value)||){&&&&&&& alert("请将表单信息填写完整!");&&&&&&&&&& }&&& if(form.password.value!=form.confirmPassword.value){&&&&&&& alert("两次密码不相同!");&&&&&&&&&& }&&& if(form.password.value.length&6||form.password.value.length&16){&&&&&&& alert("密码长度不合法!");&&&&&&&&&& }&&&}function isEmpty(str){if(str=null||str.length==0)}
&/script& 扣错! 错在 if(isEmpty(form.uid.value)||isEmpty(form.password.value)||isEmpty(form.confirmPassword.value)||isEmpty(form.email.value)||isEmpty(form.quesstion.value)||isEmpty(form.answer.value)||){这里错了:isEmpty(form.answer.value)||){ 意思就是无论如何都是会返回一个true的! 怪不得我在form表单里添加这个函数没作用,哎,以后还是小心为好啊!
ubuntu装好之后, 为浏览器firefox安装flash插件, 后来发现中文会变成方框。
如何解决?
cd /etc/fonts/conf.d/
为了安全,备份一下:
sudo cp 49-sansserif.conf 49-sansserif.conf_backup
输入如下指令:
sudo gedit ./49-sansserif.conf
此时文件显示内容。
将其中的第1、2、4个后面的sans-serif或者serif用你自己系统中支持中文的字体的名字代替,注意字体名字的大小写
比如:我的系统中安装了微软雅黑,我则用微软雅黑代替上述所说的字段,结果如下:
&&& &match target="pattern"&
&&&&&&& &test qual="all" name="family" compare="not_eq"&
&&&&&&&&&&& &string&宋体&/string&
&&&&&&& &/test&
&&&&&&& &test qual="all" name="family" compare="not_eq"&
&&&&&&&&&&& &string&宋体&/string&
&&&&&&& &/test&
&&&&&&& &test qual="all" name="family" compare="not_eq"&
&&&&&&&&&&& &string&monospace&/string&
&&&&&&& &/test&
&&&&&&& &edit name="family" mode="append_last"&
&&&&&&&&&&& &string&宋体&/string&
&&&&&&& &/edit&
&&& &/match&
文件上传的时候,报错
&1Status&500&-&
&3--------------------------------------------------------------------------------
&5type&Exception&report
&7message&
&9description&The&server&encountered&an&internal&error&()&that&prevented&it&from&fulfilling&this&request.
<span style="color: #
<span style="color: #exception&
<span style="color: #
<span style="color: #org.apache.jasper.JasperException:&An&exception&occurred&processing&JSP&page&/upload.jsp&at&line&302
<span style="color: #
<span style="color: #299:&&&&&&&&&if&(!myFile.isMissing())&{
<span style="color: #300:&&&&&&&&&&&&&FileName=(String)date.Time_Stamp();
<span style="color: #301:&&&&&&&&&&&&&sOriginalFileName=myFile.getFileName();
<span style="color: #302:&&&&&&&&&&&&&myFile.saveAs("/"+sUploadDir+FileName+"."+myFile.getFileExt());
<span style="color: #303:&&&&&&&&&&&&&sSaveFileName=FileName+"."+myFile.getFileExt();
<span style="color: #304:&&&&&&&&&&&&&sPathFileName=sUploadDir+sSaveFileN
<span style="color: #305:&&&&&&&&&&&&&System.out.println(sPathFileName);
<span style="color: #
<span style="color: #
<span style="color: #Stacktrace:
<span style="color: #&&&&org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
<span style="color: #&&&&org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
<span style="color: #&&&&org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
<span style="color: #&&&&org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
<span style="color: #&&&&javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
<span style="color: #&&&&sun.reflect.GeneratedMethodAccessor18.invoke(Unknown&Source)
<span style="color: #&&&&sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
<span style="color: #&&&&java.lang.reflect.Method.invoke(Method.java:597)
<span style="color: #&&&&org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
<span style="color: #&&&&java.security.AccessController.doPrivileged(Native&Method)
<span style="color: #&&&&javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
<span style="color: #&&&&org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
<span style="color: #&&&&org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
<span style="color: #
<span style="color: #
<span style="color: #root&cause&
<span style="color: #
<span style="color: #java.security.AccessControlException:&access&denied&(java.io.FilePermission&\UploadFile&read)
<span style="color: #&&&&java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
<span style="color: #&&&&java.security.AccessController.checkPermission(AccessController.java:546)
<span style="color: #&&&&java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
<span style="color: #&&&&java.lang.SecurityManager.checkRead(SecurityManager.java:871)
<span style="color: #&&&&java.io.File.exists(File.java:731)
<span style="color: #&&&&com.jspsmart.upload.SmartUpload.getPhysicalPath(SmartUpload.java:1067)
<span style="color: #&&&&com.jspsmart.upload.File.saveAs(File.java:91)
<span style="color: #&&&&com.jspsmart.upload.File.saveAs(File.java:65)
<span style="color: #&&&&org.apache.jsp.upload_jsp._jspService(upload_jsp.java:376)
<span style="color: #&&&&org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
<span style="color: #&&&&javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
<span style="color: #&&&&org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
<span style="color: #&&&&org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
<span style="color: #&&&&org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
<span style="color: #&&&&javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
<span style="color: #&&&&sun.reflect.GeneratedMethodAccessor18.invoke(Unknown&Source)
<span style="color: #&&&&sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
<span style="color: #&&&&java.lang.reflect.Method.invoke(Method.java:597)
<span style="color: #&&&&org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
<span style="color: #&&&&java.security.AccessController.doPrivileged(Native&Method)
<span style="color: #&&&&javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
<span style="color: #&&&&org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
<span style="color: #&&&&org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
<span style="color: #
<span style="color: #
<span style="color: #note&The&full&stack&trace&of&the&root&cause&is&available&in&the&Apache&Tomcat/6.0.18&logs.
<span style="color: #
<span style="color: #
<span style="color: #--------------------------------------------------------------------------------
<span style="color: #
<span style="color: #Apache&Tomcat/6.0.18
正常上传tomcat的提示是:
gif|jpg|jpeg|bmp|GIF|JPG|JPEG|BMP500
UploadFile/38906.jpg
异常的时候是:
gif|jpg|jpeg|bmp|GIF|JPG|JPEG|BMP500
UploadFile/
苦恼中&#8230;&#8230;&#8230;&#8230;
哎,说来真是点背,8.10升级到9.04之后因为显卡原因不能用,奈何从网上又down一个ubuntu9.04 运行wubi.exe,没有反应,运行,还没有反应, while(see the article in cnbeta) {
} 失败原因:盘符名中含有中文。解决方法:将中文改为英文就可以了。如,原先为"系统盘(C:)",改为"system(C:)"。其他也是类似的改法。注意,所有的盘符都不可以含有中文!
可能是做wubi的程序员考虑欠周全所致,希望以后的版本不会再这样。如果你已经双击了wubi,应先清除临时文件,路径为C:\Documents and Settings\Administrator\Local Settings\Temp(假设你的系统盘是C盘,并且是Administrator)。清除后,为了保险起见,重启后再运行wubi。
& via cnbeta~
Redwood Shores, CA - April 20, 2009 Oracle Corporation (NASDAQ: ORCL) and Sun Microsystems (NASDAQ: JAVA) announced today they have entered into a definitive agreement under which Oracle will acquire Sun common stock for $9.50 per share in cash. The transaction is valued at approximately $7.4 billion, or $5.6 billion net of Sun’s cash and debt. “We expect this acquisition to be accretive to Oracle’s earnings by at least 15 cents on a non-GAAP basis in the first full year after closing. We estimate that the acquired business will contribute over $1.5 billion to Oracle’s non-GAAP operating profit in the first year, increasing to over $2 billion in the second year. This would make the Sun acquisition more profitable in per share contribution in the first year than we had planned for the acquisitions of BEA, PeopleSoft and Siebel combined,” said Oracle President Safra Catz. “The acquisition of Sun transforms the IT industry, combining best-in-class enterprise software and mission-critical computing systems,” said Oracle CEO Larry Ellison. “Oracle will be the only company that can engineer an integrated system – applications to disk – where all the pieces fit and work together so customers do not have to do it themselves. Our customers benefit as their systems integration costs go down while system performance, reliability and security go up.” There are substantial long-term strategic customer advantages to Oracle owning two key Sun software assets: Java and Solaris. Java is one of the computer industry’s best-known brands and most widely deployed technologies, and it is the most important software Oracle has ever acquired. Oracle Fusion Middleware, Oracle’s fastest growing business, is built on top of Sun’s Java language and software. Oracle can now ensure continued innovation and investment in Java technology for the benefit of customers and the Java community. The Sun Solaris operating system is the leading platform for the Oracle database, Oracle’s largest business, and has been for a long time. With the acquisition of Sun, Oracle can optimize the Oracle database for some of the unique, high-end features of Solaris. Oracle is as committed as ever to Linux and other open platforms and will continue to support and enhance our strong industry partnerships. “Oracle and Sun have been industry pioneers and close partners for more than 20 years,” said Sun Chairman Scott McNealy. “This combination is a natural evolution of our relationship and will be an industry-defining event.” “This is a fantastic day for Sun’s customers, developers, partners and employees across the globe, joining forces with the global leader in enterprise software to drive innovation and value across every aspect of the technology marketplace,” said Jonathan Schwartz, Sun’s CEO, “From the Java platform touching nearly every business system on earth, powering billions of consumers on mobile handsets and consumer electronics, to the convergence of storage, networking and computing driven by the Solaris operating system and Sun’s SPARC and x64 systems. Together with Oracle, we’ll drive the innovation pipeline to create compelling value to our customer base and the marketplace.” “Sun is a pioneer in enterprise computing, and this combination recognizes the innovation and customer success the company has achieved. Our largest customers have been asking us to step up to a broader role to reduce complexity, risk and cost by delivering a highly optimized stack based on standards,” said Oracle President Charles Phillips. “This transaction will preserve and enhance investments made by our customers, while we continue to work with our partners to provide customers with choice.” The Board of Directors of Sun Microsystems has unanimously approved the transaction. It is anticipated to close this summer, subject to Sun stockholder approval, certain regulatory approvals and customary closing conditions. There will be a conference call today to discuss the transaction at 5:30 a.m. Pacific time. Investors can listen to the conference call by dialing (719) 234-7870, passcode 923645. A replay will be available for 24 hours after the call ends at (719) 884-8882, passcode: 923645. A live audio webcast of the call will be made available at /investor and a replay will be available for seven days after the call ends. About Sun Microsystems Sun Microsystems, Inc. (NASDAQ: JAVA) develops the technologies that power the global marketplace. Guided by a singular vision -- "The Network is the Computer" -- Sun drives network participation through shared innovation, community development and open source leadership. Sun can be found in more than 100 countries and on the Web at . About Oracle Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. For more information about Oracle, please visit our Web site at
Trademarks Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Sun, Sun Microsystems, the Sun logo, Java, Solaris and the Network is the Computer are trademarks or registered trademarks of Sun Microsystems, Inc. or its subsidiaries in the United States and other countries Cautionary Statement Regarding Forward-Looking Statements This press release contains certain forward-looking statements about Oracle and Sun, including statements that involve risks and uncertainties concerning Oracle's proposed acquisition of Sun, anticipated product information, estimates of future results of operations and general business outlook. When used in this press release, the words "anticipates", “estimates”, "may", "can", “will”, "believes", "expects", "projects", "intends", "likely", similar expressions and any other statements that are not historical facts are intended to identify those assertions as forward-looking statements. Any such statement may be influenced by a variety of factors, many of which are beyond the control of Oracle or Sun, that could cause actual outcomes and results to be materially different from those projected, described, expressed or implied in this press release due to a number of risks and uncertainties. Potential risks and uncertainties include, among others, the possibility that the transaction will not close or that the closing may be delayed, the anticipated synergies of the combined companies may not be achieved after closing, the combined operations may not be successfully integrated in a timely manner, if at all, general economic conditions in regions in which either company does business, and the possibility that Oracle or Sun may be adversely affected by other economic, business, and/or competitive factors. Accordingly, no assurances can be given that any of the events anticipated by the forward-looking statements will transpire or occur, or if any of them do so, what impact they will have on the results of operations or financial condition of Oracle or Sun. In addition, please refer to the documents that Oracle and Sun, respectively, file with the Securities and Exchange Commission (the “SEC”) on Forms 10-K, 10-Q and 8-K. These filings identify and address other important factors that could cause Oracle's and Sun's respective financial and operational results to differ materially from those contained in the forward-looking statements set forth in this document. You are cautioned to not place undue reliance on forward-looking statements, which speak only as of the date of this report. Neither Oracle nor Sun is under any duty to update any of the information in this release. Additional Information about the Merger and Where to Find It In connection with the proposed merger, Sun will file a proxy statement with the SEC. Additionally, Sun and Oracle will file other relevant materials in connection with the proposed acquisition of Sun by Oracle pursuant to the terms of an Agreement and Plan of Merger by and among Oracle, Soda Acquisition Corporation, a wholly-owned subsidiary of Oracle, and Sun. The materials to be filed by Sun with the SEC may be obtained free of charge at the SEC's web site at www.sec.gov. Investors and security holders of Sun are urged to read the proxy statement and the other relevant materials when they become available before making any voting or investment decision with respect to the proposed merger because they will contain important information about the merger and the parties to the merger. Oracle, Sun and their respective directors, executive officers and other members of its management and employees, under SEC rules, may be deemed to be participants in the solicitation of proxies of Sun stockholders in connection with the proposed merger. Investors and security holders may obtain more detailed information regarding the names, affiliations and interests of certain of Oracle's executive officers and directors in the solicitation by reading the proxy statement and other relevant materials filed with the SEC when they become available. Information concerning the interests of Sun's participants in the solicitation, which may, in some cases, be different than those of Sun's stockholders generally, is set forth in the materials filed with the SEC on Form 10-K and will be set forth in the proxy statement relating to the merger when it becomes available. Contact Info Karen Tillman Oracle Corporate Communications +1.650.607.0326 Roy Lobo Oracle Investor Relations +1.650.506.4073
&&&& 摘要: &&
http://mysql.ntu.edu.tw/Downloads/Connector-J/mysql-connector-java-5.0.8.zip
  应用J2EE平台开发的系统的性能是系统使用者和开发者都关注的问题,本文从服务器端编程时应注意的几个方面讨论代码对性能的影响,并总结一些解决的建议。关键词:性能,Java,J2EE,EJB,Servlet,JDBC
Java 2 Platform, Enterprise Edition (J2EE)是当前很多商业应用系统使用的开发平台,该技术提供了一个基于组件的方法来设计、开发、装配和部署企业级应用程序。J2EE平台提供了一个多层结构的分布式的应用程序模型,可以更快地开发和发布的新的应用解决方案。&#160;
J2EE是一种技术规范,定义了整个标准的应用开发体系结构和一个部署环境,应用开发者开发时只要专注于具体商业逻辑和商业业务规则的实现上,而其他的诸如事务、持久化、安全等系统开发问题可以由应用程序容器或者服务器处理,开发完成后,就可以方便地部署到实现规范的应用服务器中。&#160;
作为网络上的商业应用系统,同时访问的人数是很多的,在大量访问的情况下,过多的资源请求和有限的服务器资源(内存、CPU时间、网络带宽等)之间就会出现矛盾,应用系统的性能就显得很重要了,有时正确的代码并不能保证项目的成功,性能往往是最后决定一个项目是否成功关键。
本文主要从性能的角度出发,讨论J2EE服务器端的代码性能优化和提升。 
二、常见的Java 编程 J2EE语言基础是Java,常用的Java代码问题对应用系统的性能影响,
下面讨论了一些应该注意方面。&#160;
使用StringBuffer代替String 当处理字符串的相加时,常见的写法是:
String str1 = "Hello";
String str2 = "welcome to world";
String str3 = str1 + ", " + str2 +"!";
System.out.println(str3);
很多人都知道,这样的代码效率是很低的,因为String是用来存储字符串常量的,如果要执行&#8220;+&#8221;的操作,系统会生成一些临时的对象,并对这些对象进行管理,造成不必要的开销。
  如果字符串有连接的操作,替代的做法是用StringBuffer类的append方法,它的缺省构造函数和append的实现是:
public StringBuffer() { // 构造函数
this(16); // 缺省容量16}
public synchronized StringBuffer append(String str) {
 if (str == null) {
  str = String.valueOf(str);
 int len =str.length();
 int newcount = count +
 if(newcount > value.length)
 expandCapacity(newcount);
 // 扩充容量
 str.getChars(0, len, value, count);
  当字符串的大小超过缺省16时,代码实现了容量的扩充,为了避免对象的重新扩展其容量,更好的写法为:
StringBuffer buffer = new StringBuffer(30);
// 分配指定的大小。
buffer.append("hello");
buffer.append(",");
buffer.append("welcometo world!");
String str = buffer.toString();
  &#183;生成对象时,分配合理的空间和大小
  Java中的很多类都有它的默认的空间分配大小,对于一些有大小的对象的初始化,应该预计对象的大小,然后使用进行初始化,上面的例子也说明了这个问题,StringBuffer创建时,我们指定了它的大小。
  另外的一个例子是Vector,当声明Vector vect=new Vector()时,系统调用:
public Vector() {// 缺省构造函数
 this(10); // 容量是 10;
  缺省分配10个对象大小容量。当执行add方法时,可以看到具体实现为:..
public synchronized boolean add(Object o) {
 modCount++;
 ensureCapacityHelper(elementCount+1);
 elementData[elementCount++] =o;
private void ensureCapacityHelper(int minCapacity) {
 int oldCapacity = elementData.
 if (minCapacity > oldCapacity) {
  Object oldData[] = elementD
  int newCapacity = (capacityIncrement > 0) ? (oldCapacity + capacityIncrement) :
(oldCapacity * 2);
  if (newCapacity & minCapacity) {
   newCapacity = minC
  elementData = new Object[newCapacity];
  System.arraycopy(oldData, 0, elementData, 0, elementCount);
  我们可以看到,当Vector大小超过原来的大小时,一些代码的目的就是为了做容量的扩充,在预先知道该Vector大小的话,可以指定其大小,避免容量扩充的开销,如知道Vector大小为100时,初始化是就可以象这样。
Vector vect =.. new Vector(100);
  &#183;优化循环体
  循环是比较重复运行的地方,如果循环次数很大,循环体内不好的代码对效率的影响就会被放大而变的突出。考虑下面的代码片:..
Vector vect = new Vector(1000);
for( inti=0; i&vect.size(); i++){
  for循环部分改写成:
int size = vect.size();
for( int i=0; i> i++){
  如果size=1000,就可以减少1000次size()的系统调用开销,避免了循环体重复调用。
  再看如下的代码片:..
for (int i = 0;i &100000;i++)
if (i%10 == 9) {
 ... // 每十次执行一次
  改写成也可以提高效率:..
for(inti =0,j =10; i&100000; i++,j--){
 if(j == 0){
  ... // 每十次执行一次
  j = 10;
  所以,当有较大的循环时,应该检查循环内是否有效率不高的地方,寻找更优的方案加以改进。
  &#183;对象的创建
  尽量少用new来初始化一个类的实例,当一个对象是用new进行初始化时,其构造函数链的所有构造函数都被调用到,所以new操作符是很消耗系统资源的,new一个对象耗时往往是局部变量赋值耗时的上千倍。同时,当生成对象后,系统还要花时间进行垃圾回收和处理。
  当new创建对象不可避免时,注意避免多次的使用new初始化一个对象。
  尽量在使用时再创建该对象。如:
NewObject object = new NewObject();
 value =object.getValue();
  可以修改为:
 NewObject object = new NewObject();
 Value =object.getValue();
  另外,应该尽量重复使用一个对象,而不是声明新的同类对象。一个重用对象的方法是改变对象的值,如可以通过setValue之类的方法改变对象的变量达到重用的目的。
  &#183;变量的注意事项
  尽量使用局部变量,调用方法时传递的参数以及在调用中创建的临时变量都保存在栈(Stack) 中,速度较快。其他变量,如静态变量、实例变量等,都在堆(Heap)中创建,速度较慢。
  尽量使用静态变量,即加修饰符static,如果类中的变量不会随他的实例而变化,就可以定义为静态变量,从而使他所有的实例都共享这个变量。
  &#183;方法(Method)调用
  在Java中,一切都是对象,如果有方法(Method)调用,处理器先要检查该方法是属于哪个对象,该对象是否有效,对象属于什么类型,然后选择合适的方法并调用。
  可以减少方法的调用,同样一个方法:
public void CallMethod(int i ){
 if( i ==0 ){
 ... // 其他处理
  如果直接调用,
int i = 0;
CallMethod(i);
  就不如写成:
int i = 0;
if( i ==0 ){
 CallMethod(i);
  不影响可读性等情况下,可以把几个小的方法合成一个大的方法。
  另外,在方法前加上final,private关键字有利于编译器的优化。
  &#183;慎用异常处理
  异常是Java的一种错误处理机制,对程序来说是非常有用的,但是异常对性能不利。抛出异常首先要创建一个新的对象,并进行相关的处理,造成系统的开销,所以异常应该用在错误处理的情况,不应该用来控制程序流程,流程尽量用while,if等处理。
  在不是很影响代码健壮性的前提下,可以把几个try/catch块合成一个。
  &#183;同步
  同步主要出现在多线程的情况,为多线程同时运行时提供对象数据安全的机制,多线程是比较复杂话题,应用多线程也是为了获得性能的提升,应该尽可能减少同步。
  另外,如果需要同步的地方,可以减少同步的代码段,如只同步某个方法或函数,而不是整个代码。
  &#183;使用Java系统API
  Java的API一般都做了性能的考虑,如果完成相同的功能,优先使用API而不是自己写的代码,如数组复制通常的代码如下:
int size = 1000;
String[] strArray1 = new String[size];
String[] strArray2 = new String[size];
for(inti=0;i&i++){ // 赋值
 strArray1[i] = (new String("Array: " + i));
for(inti=0;i&i++){ // 复制
 strArray2[i]=(new String((String)a[i]));
  如果使用Java提供的API,就可以提高性能:
int size = 1000;
String[] strArray1 = new String[size];
String[] strArray2 = new String[size];
for(inti=0;i&i++){ // 赋值
strArray1[i] = (new String("Array: " + i));
System.arraycopy(strArray1,0,strArray2,0,size); // 复制
  同样的一个规则是,当有大量数据的复制时,应该使用System.arraycopy()。
  三、I/O 性能
  输入/输出(I/O)包括很多方面,我们知道,进行I/O操作是很费系统资源的。程序中应该尽量少用I/O操作。使用时可以注意: . 合理控制输出函数System.out.println()对于大多时候是有用的,特别是系统调试的时候,但也会产生大量的信息出现在控制台和日志上,同时输出时,有序列化和同步的过程,造成了开销。
  特别是在发行版中,要合理的控制输出,可以在项目开发时,设计好一个Debug的工具类,在该类中可以实现输出开关,输出的级别,根据不同的情况进行不同的输出的控制。
  &#183;使用缓存
  读写内存要比读写文件要快很多,应尽可能使用缓冲。
  尽可能使用带有Buffer的类代替没有Buffer的类,如可以用BufferedReader 代替Reader,用BufferedWriter代替Writer来进行处理I/O操作。
  同样可以用BufferedInputStream代替InputStream都可以获得性能的提高。
  四、Servlet
  Servlet采用请求——响应模式提供Web服务,通过ServletResponse以及ServletRequest这两个对象来输出和接收用户传递的参数,在服务器端处理用户的请求,根据请求访问数据库、访问别的Servlet方法、调用EJB等等,然后将处理结果返回给客户端。
  &#183;尽量不使用同步
  Servlet是多线程的,以处理不同的请求,基于前面同步的分析,如果有太多的同步就失去了多线程的优势了。
  &#183;不用保存太多的信息在HttpSession中
  很多时候,存储一些对象在HttpSession中是有必要的,可以加快系统的开发,如网上商店系统会把购物车信息保存在该用户的Session中,但当存储大量的信息或是大的对象在会话中是有害的,特别是当系统中用户的访问量很大,对内存的需求就会很高。
  具体开发时,在这两者之间应作好权衡。
  &#183;清除Session
  通常情况,当达到设定的超时时间时,同时有些Session没有了活动,服务器会释放这些没有活动的Session,.. 不过这种情况下,特别是多用户并访时,系统内存要维护多个的无效Session。
  当用户退出时,应该手动释放,回收资源,实现如下:..
HttpSession theSession = request.getSession();
// 获取当前Session
if(theSession != null){
 theSession.invalidate(); // 使该Session失效
  五、EJB 问题
  EJB是Java服务器端服务框架的规范,软件厂商根据它来实现EJB服务器。应用程序开发者可以专注于支持应用所需的商业逻辑,而不用担心周围框架的实现问题。EJB规范详细地解释了一些最小但是必须的服务,如事务,安全和名字等。
  &#183;缓存Home接口
  EJB库使用Enterprise Bean 的客户端通过它的Home接口创建它的实例。客户端能通过JNDI访问它。服务器通过Lookup方法来获取。
  JNDI是个远程对象,通过RMI方式调用,对它的访问往往是比较费时的。所以,在设计时可以设计一个类专门用来缓存Home接口,在系统初始化时就获得需要的Home接口并缓存,以后的引用只要引用缓存即可。
  &#183;封装Entity Bean
  直接访问Entity Bean是个不好的习惯,用会话Bean封装对实体Bean的访问能够改进事务管理,因为每一个对get方法的直接调用将产生一个事务,容器将在每一个实体Bean的事务之后执行一个&#8220;Load-Store&#8221;.. 操作。
  最好在Session Bean中完成Entity Bean的封装,减少容器的事务处理,并在Session Bean中实现一些具体的业务方法。
  &#183;释放有状态的Session Bean
  相当于HttpSession,当把一个Session Bean设为Stateful,即有状态的Session Bean 后,应用容器(Container)就可能有&#8220;钝化&#8221;(Passivate)和活化(Activate)过程,即在主存和二级缓存之间对SessionBean进行存储位置的转移,在这个过程中,存在序列化过程。
  通常有状态Session Bean的释放是在超时时发生,容器自动的清除该对象,但是如果交给容器管理,一方面可能产生对象钝化,另一方面未超时期间,系统还要 维护一份该对象,所以如果我们确认使用完该StatefulSession Bean后不再需要时,可以显式的将其释放掉,方法是调用:
theSesionBean.remove();
  六、数据库访问
  在J2EE开发的应用系统中,数据库访问一般是个必备的环节。数据库用来存储业务数据,供应用程序访问。
  在Java技术的应用体系中,应用程序是通过JDBC(Java Database Connectivity)实现的接口来访问数据库的,JDBC支持&#8220;建立连接、SQL语句查询、处理结果&#8221;等基本功能。在应用JDBC接口访问数据库的过程中,只要根据规范来实现,就可以达到要求的功能。
  但是,有些时候进行数据查询的效率着实让开发人员不如所愿,明明根据规范编写的程序,运行效果却很差,造成整个系统的执行效率不高。
  &#183;使用速度快的JDBC驱动
  JDBC API包括两种实现接口形式,一种是纯Java实现的驱动,一种利用ODBC驱动和数据库客户端实现,具体有四种驱动模式并各有不同的应用范围,针对不同的应用开发要选择合适的JDBC驱动,在同一个应用系统中,如果选择不同的JDBC驱动,在效率上会有差别。
  例如,有一个企业应用系统,不要求支持不同厂商的数据库,这时就可以选择模式4的JDBC驱动,该驱动一般由数据库厂商实现的基于本地协议的驱动,直接调用数据库管理系统使用的协议,减少了模式3中的中间层。
  &#183;使用JDBC连接池
  为了提高访问数据库的性能,我们还可以使用JDBC 2.0的一些规范和特性,JDBC是占用资源的,在使用数据库连接时可以使用连接池Connection Pooling,避免频繁打开、关闭Connection。而我们知道,获取Connection是比较消耗系统资源的。
  Connection缓冲池是这样工作的:当一个应用程序关闭一个数据库连接时,这个连接并不真正释放而是被循环利用,建立连接是消耗较大的操作,循环利用连接可以显著的提高性能,因为可以减少新连接的建立。
  一个通过DataSource获取缓冲池获得连接,并连接到一个CustomerDB数据源的代码演示如下:
Context ctx = new InitialContext();
DataSource dataSource = (DataSource) ctx.lookup("jdbc/CustomerDB");
Connection conn = dataSource.getConnection("password","username");
  &#183;缓存DataSource
  一个DataSource对象代表一个实际的数据源。这个数据源可以是从关系数据库到表格形式的文件,完全依赖于它是怎样实现的,一个数据源对象注册到JNDI名字服务后,应用程序就可以从JNDI服务器上取得该对象,并使用之和数据源建立连接。
  通过上面的例子,我们知道DataSource是从连接池获得连接的一种方式,通过JNDI方式获得,是占用资源的。
  为了避免再次的JNDI调用,可以系统中缓存要使用的DataSource。
  &#183;关闭所有使用的资源
  系统一般是并发的系统,在每次申请和使用完资源后,应该释放供别人使用,数据库资源每个模式的含义可以参考SUN JDBC的文档,不同是比较宝贵的,使用完成后应该保证彻底的释放。
  请看下面的代码段:
Connection conn =
Statement stmt =
ResultSet rs =
 DataSource dataSource = getDataSource();
 // 取的DataSource的方法,实现略。
 conn = datasource.getConnection();
 stmt = conn.createStatement();
 rs = stmt.executeQuery("SELECT * FROM ...");
 ... // 其他处理
 rs.close();
 stmt.close();
 conn.close();
}catch (SQLException ex) {
 ... // 错误处理
  粗看似乎没有什么问题,也有关闭相关如Connection等系统资源的代码,但当出现异常后,关闭资源的代码可能并不被执行,为保证资源的确实已被关闭,应该把资源关闭的代码放到finally块:
Connection conn =
Statement stmt =
ResultSet rs =
 DataSource dataSource = getDataSource();
 // 取的DataSource的方法,实现略。
 conn = datasource.getConnection();
 stmt = conn.createStatement();
 rs = stmt.executeQuery("SELECT * FROM ...");
 ... // 其他处理
}catch (SQLException ex) {
 ... // 错误处理
 if (rs!=null) {
   rs.close(); // 关闭ResultSet}
  catch (SQLException ex) {
   ... // 错误处理
 if (stmt!=null){
   stmt.close(); // 关闭Statement}
  catch (SQLException ex) {
   ... // 错误处理
 if (conn!=null){
   conn.close(); // 关闭Connection}
  catch (SQLException ex) {
   ... // 错误处理
  &#183;大型数据量处理
  当我们在读取诸如数据列表、报表等大量数据时,可以发现使用EJB的方法是非常慢的,这时可以使用直接访问数据库的方法,用SQL直接存取数据,从而消除EJB的经常开支(例如远程方法调用、事务管理和数据序列化,对象的构造等)。
  &#183;缓存经常使用的数据
  对于构建的业务系统,如果有些数据要经常要从数据库中读取,同时,这些数据又不经常变化,这些数据就可以在系统中缓存起来,使用时直接读取缓存,而不用频繁的访问数据库读取数据。
  缓存工作可以在系统初始化时一次性读取数据,特别是一些只读的数据,当数据更新时更新数据库内容,同时更新缓存的数据值。
  一个例子是,在一套企业应用系统中,企业的信息数据(如企业的名称)在多个业务应用模块中使用,这时就可以把这些数据缓存起来,需要时直接读取缓存的企业信息数据。
  七、总结
  一般意义上说,参与系统运行的代码都会对性能产生影响,实际应用中应该养成良好的编程规范、编写高质量的代码,当系统性能出现问题时,要找到主要影响性能的瓶颈所在,然后集中精力优化这些代码,能达到事半功倍的效果。
  J2EE性能的优化包括很多方面的,要达到一个性能优良的系统,除了关注代码之外,还应该根据系统实际的运行情况,从服务器软硬件环境、集群技术、系统构架设计、系统部署环境、数据结构、算法设计等方面综合考虑。
&&&& 摘要: 第二种,JavaBean的形式。
&&&&&&&&&&&&&&&&&&&&&&&&&&& //导入包
...&&
,打造山寨信息网
谷歌金山词霸火星文版:
Convert your email address into a short, cute and safe link you can share on the web, in Twitter, forums, raigslist, anywhere 为什么要隐藏Email地址呢?
各种Email嗅探软件可以很方便地将你个人的Email地址取过去,随之发送一些代理发票等等一些无聊的邮件。 访问地址: My Email:
import&java.io.*;
public&class&FileClass{
&&&&String&sP
&&&&String&sFileP
&&&&String&sC
&&&&public&boolean&newFloder(String&s){
&&&&&&&&sPath&=&s;
&&&&&&&&sPath&=&sPath.toString();
&&&&&&&&File&myFilePath&=&new&File(sPath);
&&&&&&&&if(!myFilePath.exists()){
&&&&&&&&&&&&myFilePath.mkdirs();
&&&&&&&&&&&&return&true;&&&&&&&&
&&&&&&&&else&return&false;
&&&&public&static&void&main(String&[]&args){
&&&&&&&&FileClass&file1&=&new&FileClass();
&&&&&&&&String&s&=&"F:/TEST";
&&&&&&&&if(file1.newFloder(s)){
&&&&&&&&&&&&System.out.println("文件夹创建成功!");
&&&&&&&&else&System.out.println("文件创建失败");
看我这么美妙的musicfeeling被改成万恶的stcms,感觉心里挺不忿的,于是乎就想法子将其干掉,换成正常网址
根据个人WordPress经验,感觉应该从数据库入手,MS那个本页面地址会是从数据库读出的:
我查询了最有可能的data,随后又尝试了其他的,无果,郁闷中&#8230;&#8230;
考虑到会在config.inc.php里,一阵欣喜,打开&#8230;&#8230;
随之我发现这个跟后台的MS一样&#8230;&#8230;
参数完全一样&#8230;&#8230;&#8230;&#8230;
又在FTP里转悠,cd js& and& cd include
下载了很多文件,但是依然&#8230;&#8230;
依然找不到问题的所在,
这个时候,一首熟悉的歌曲响起——梦飞船《不值得》&#8230;&#8230;
去洗了一把脸,根据WordPress原理 然后我发现了FTP目录里我嗅探到了一个很敏感的目录:
template!!
据正常人的思维,所有的风格模板应该都带有制作人的版权信息的,因此这里会不会&#8230;&#8230;
music.html/.这个MS就是音乐播放页面?~~!!!
下载 UE之&#8230;&#8230;
一句激动人心的代码:&
&input id="url" type="text" size="45" value="http://stcms.vicp.net/music/music.php?id={$music.id}"/&
遂将:http://stcms.vicp.net/music/
替换为 即可,
copyCode(o)
{o.select();
o.createTextRange();js.execCommand(
复制成功!
document.write(
&table align=center class=tableborder1 cellpadding=1 cellspacing=0&&tr&
); document.write(
&td width=10% nowrap class=tablebody1&本页URL地址(双击复制):&/td&
); document.write(
&td class=tablebody1&&textarea onfocus=this.select() style='width:100%;overflow-y:' ondblclick=copyCode(this) rows=1&
); document.write(self.location
&/textarea&&/td&&/tr&&/table&
java.util.Date randseed
java.util.Date();
java.util.Random r
java.util.Random(randseed.getTime());
唯一一直变化就是时间
下载地址:http://www.blogjava.net/Files/chenglu/jspSmartUpload.rar
在这个世界上,有数百万的人热衷于软件开发,他们有很多名字,如:软件工程师(Software Engineer),程序员(Programmer),编码人(Coder),开发人员(Developer)。经过一段时间后,这些人能够成为一个优秀的编码人员,他们非常熟悉如何用计算机语言来完成自己的工作。但是,如果你要成为一个优秀的程序员,你还可以需要有几件事你需要注意,如果你能让下面十个条目成为你的习惯,那么你才能真正算得上是优秀程序员。
1. 学无止境。就算是你有了10年以上的程序员经历,你也得要使劲地学习,因为你在计算机这个充满一创造力的领域,每天都会有很多很多的新事物出现。你需要跟上时代的步伐。你需要去了解新的程序语言,以及了解正在发展中的程序语言,以及一些编程框架。还需要去阅读一些业内的新闻,并到一些热门的社区去参与在线的讨论,这样你才能明白和了解整个软件开发的趋势。在国内,一些著名的社区例如:CSDN,ITPUB,CHINAUINX等等,在国外,建议你经常上一上去看看各种BLOG的聚合。
2. 掌握多种语言。程序语言总是有其最适合的领域。当你面对需要解决的问题时,你需要找到一个最适合的语言来解决这些问题。比如,如果你需要性能,可能C/C++是首选,如果你需要跨平台,可能Java是首选,如果你要写一个Web上的开发程序,那么 PHP,ASP,Ajax,JSP可能会是你的选择,如果你要处理一些文本并和别的应用交互,可能Perl, Python会是最好的。所以,花一些时间去探索一下其它你并熟悉的程序语言,能让你的眼界变宽,因为你被武装得更好,你思考问题也就更为全面,这对于自己和项目都会有好的帮助。
3. 理性面对不同的操作系统或技术。程序员们总是有自己心目中无可比拟的技术和操作系统,有的人喜欢Ubuntu,有的人喜欢Debian,还有的人喜欢Windows,以及FreeBSD,MacOSX或Solaris等等。看看我的BLOG(
)中的那篇《
》后的回复你就知道程序员们在维护起自己的忠爱时的那份执着了。只有一部分优秀的程序员明白不同操作系统的优势和长处和短处,这样,在系统选型的时候,才能做到真正的客观和公正,而不会让情绪影响到自己。同样,语言也是一样,有太多的程序员总是喜欢纠缠于语言的对比,如:Java和Perl。哪个刚刚出道的程序员没有争论去类似的话题呢?比如VC++和Delphi等等。争论这些东西只能表明自己的肤浅和浮燥。优秀的程序并不会执着于这些,而是能够理性的分析和理心地面对,从而才能客观地做出正确的选择。
4. 别把自己框在单一的开发环境中。 再一次,正如上面所述,每个程序员都有自己忠爱的工具和技术,有的喜欢老的(比如我就喜欢Vi编辑程序),而有的喜欢新的比如gedit或是Emacs 等。有的喜欢使用像VC++一样的调试器,而我更喜欢GDB命令行方面的调式器。等等等等。程序员在使用什么样的工具上的争论还少吗?到处都是啊。使用什么样的工具本来无所谓,只要你能更好更快地达到你的目的。但是有一点是优秀程序员都应该了解的——那就是应该去尝试一下别的工作环境。没有比较,你永远不知道谁好谁不好,你也永远不知道你所不知道的。
5. 使用版本管理工具管理你的代码。千万不要告诉我你不知道源码的版本管理,如果你的团队开发的源代码并没有版本管理系统,那么我要告诉你,你的软件开发还处于石器时代。赶快使用一个版式本管理工具吧。CVS 是一个看上去平淡无奇的版本工具,但它是被使用最广的版本管理系统,Subversion 是CVS的一个升级版,其正在开始接管CVS的领地。Git 又是一个不同的版本管理工具。还有Visual SourceSafe等。使用什么样的版本管理工具依赖于你的团队的大小和地理分布,你也许正在使用最有效率或最没有效率的工具来管理你的源代码。但一个优秀的程序员总是会使用一款源码版本管理工具来管理自己的代码。如果你要我推荐一个,我推荐你使用开源的Subversion。
6. 是一个优秀的团队成员。 除非你喜欢独奏,除非你是孤胆英雄。但我想告诉你,今天,可能没有一个成熟的软件是你一个人能做的到的,你可能是你团队中最牛的大拿,但这并不意味着你就是好的团队成员。你的能力只有放到一个团队中才能施展开来。你在和你的团队成员交流中有礼貌吗?你是否经常和他们沟通,并且大家都喜欢和你在一起讨论问题?想一想一个足球队吧,你是这个队中好的成员吗?当别人看到你在场上的跑动,当别人看到你的传球和接球和抢断,能受到鼓舞吗?
7. 把你的工作变成文档。 这一条目当然包括了在代码中写注释,但那还仅仅不够,你还需要做得更多。有良好的注释风格的代码是一个文档的基础,他能够让你和你的团队容易的明白你的意图和想法。写下文档,并不仅仅是怕我们忘了当时的想法,而且还是一种团队的离线交流的方法,更是一种知识传递的方法。记录下你所知道的一切会是一个好的习惯。因为,我相信你不希望别人总是在你最忙的时候来打断你问问题,或是你在休假的时候接到公司的电话来询问你问题。而你自己如果老是守着自己的东西,其结果只可能是让你自己长时间地深陷在这块东西内,而你就更本不可以去做更多的事情。包括向上的晋升。你可能以为“教会徒弟能饿死师父”,但我告诉你,你的保守会让你失去更多更好的东西,请你相信我,我绝不是在这里耸人听闻。
8. 注意备份和安全。 可能你觉得这是一个“废话”,你已明白了备份的重要性。但是,我还是要在这里提出,丢失东西是我们人生中的一部份,你总是会丢东西,这点你永远无法避免。比如:你的笔记本电脑被人偷了,你的硬盘损坏了,你的电脑中病毒了,你的系统被人入侵了,甚至整个大楼被烧了,等等,等等。所以,做好备份工作是非常非常重要的事情,硬盘是不可信的,所以定期的刻录光盘或是磁带可能会是一个好的方法,网络也是不可信的,所以小心病毒和黑客,不但使用软件方面的安全策略,你更需要一个健全的管理制度。此外,尽量的让你的数据放在不同的地方,并做好定期(每日,每周,每月)的备份策略。
9. 设计要足够灵活。 可能你的需求只会要求你实现一个死的东西,但是,你作为一个优秀的程序,你应该随时在思考这个死的东西是否可以有灵活的一面,比如把一些参数变成可以配置的,把一些公用的东西形成你的函数库以便以后重用,是否提供插件方面的功能?你的模块是否要以像积木一样随意组合?如果要有修改的话,你的设计是否能够马上应付?当然,灵活的设计可能并不是要你去重新发明轮子,你应该尽可能是使用标准化的东西。所谓灵话的设计就是要让让考虑更多需求之外的东西,把需求中这一类的问题都考虑到,而不是只处理需求中所说的那一特定的东西。比如说,需要需要的屏幕分辨率是800×600,那么你的设计能否灵活于其他的分辨率?程序设计总是需要我们去处理不同的环境,以及未来的趋势。我们需要用动态的眼光去思考问题,而不是刻舟求剑。也许有一天,你今天写的程序就要移植到别的环境中去,那个时候你就能真正明白什么是灵活的设计了。
10. 不要搬起石头砸自己的脚。程序员总是有一种不好的习惯,那就是总是想赶快地完成自己手上的工作。但情况却往往事已愿违。越是想做得快,就越是容易出问题,越是想做得快,就越是容易遗漏问题,最终,程序改过来改过去,按下葫芦起了瓢,最后花费的时间和精力反而更多。欲速而不达。优秀程序员的习惯是前面多花一些时间多作一些调查,试验一下不网的解决方案,如果时间允许,一个好的习惯是,每4个小时的编程,需要一个小时的休息,然后又是4个小时的编码。当然,这因人而异,但其目的就是让你时常回头看看,让你想一想这样三个问题:1)是否这么做是对的?2)是否这么做考虑到了所有的情况?3)是否有更好的方法?想好了再说,时常回头看看走过的路,时常总结一下过去事,会对你有很大的帮助。
以上是十条优秀程序员的习惯或行为规范,希望其可以对你有所帮助。
本文来源于网上phil的BLOG,但我在写作过程中使用了自己的语言和方法重新描述了一下这十条,所以,我希望你在转载的时候能够注明作者和出处以表示对我的尊重。谢谢!
&&&& 摘要: /**/
* mainf.java * * Created on , 10:16:38
必须首先是BlogJava的注册用户登陆之后回复本贴:1、是否是南阳理工学院软件学院学生2、if (1=true)注明自己的班级及姓名 如:08届Java2班XXX3、自己在blogjava的账号4、联系方式5、擅长方向6、兴趣方向
BloGTK1.1,一款Linux下的blog远程发布软件,测试一下
不错,赞一个! 选择blog-api类型的那个
X:\\*(TomCat安装目录)\work\Catalina\localhost
今日对一个练手项目进行更新,可是如何刷新也不行,Ctrl+F5,清除cookie和缓存文件也不可以,遂在tomcat目录中游荡,然后就找到了上面的那个目录,发现里面有一些文件夹,跟我WebApps下的基本相似,然后就删除之,呵呵,成功了~
Student.java
&1package&
&2public&class&Student{
&3private&String&
&4&&&&public&void&setName(String&name){
&5&&&&&&&&this.name=
&7&&&&public&String&getName(){
&8&&&&&&&&return&
<span style="color: #}
&1&%&#64;&page&contentType="text/&charset=gb2312"&language="java"&import="java.sql.*"&errorPage=""&%&
&2&!DOCTYPE&html&PUBLIC&"-//W3C//DTD&XHTML&1.0&Transitional//EN"&"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&
&3&jsp:useBean&id="stu"&class="bean.Student"&scope="page"&/&
&4&html&xmlns="http://www.w3.org/1999/xhtml"&
&6&meta&http-equiv="Content-Type"&content="text/&charset=gb2312"&/&
&7&title&input&/title&
<span style="color: #&form&name="form1"&method="post"&action=""&
<span style="color: #&&&p&姓名:
<span style="color: #&&&&&input&name="name"&type="text"&&
<span style="color: #&&&/p&
<span style="color: #&&&p&
<span style="color: #&&&&&input&type="submit"&name="Submit"&value="提交"&/&
<span style="color: #&&&/p&
<span style="color: #&/form&
<span style="color: #&jsp:setProperty&name="stu"&property="*"&/&
<span style="color: #您的输入是:&br&&br&
<span style="color: #&%=stu.getName()&%&
<span style="color: #&/body&
<span style="color: #&/html&
<span style="color: #
一些非常简单的代码,但让我倍受打击
首先,形似&jsp:****&的语句都在句尾的"/"一定不能省略
其次,useBean此处是id="XXX" 其他调用的地方都是name="XXX"
最后,输出可以用&jsp: getProperty...../&
也可以用 &%=ID.getXXX()&%&输出
(清晰版稍后放出&#8230;&#8230;)
南阳理工学院软件学院郭东恩老师主讲!
教案下载地址:http://www.blogjava.net/Files/chenglu/2005%E5%AE%9E%E9%AA%8C.zip
版权所有,请勿作为商用!
请与原作者联系:
下载地址:
/download/3778306/sqlserver2005.rar.html& (原版-EXE文件)
/download/3778908/SQl2005v3.zip.html
偶是菜鸟,小菜鸟,嘿嘿,
问题已经在里面用红色标出,咋整呢?
session从第一个页面传到第二个
&1&%&#64;&page&contentType="text/&charset=gb2312"&language="java"&import="java.sql.*"&errorPage=""&%&
&2&!DOCTYPE&html&PUBLIC&"-//W3C//DTD&XHTML&1.0&Transitional//EN"&"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&
&3&html&xmlns="http://www.w3.org/1999/xhtml"&
&5&meta&http-equiv="Content-Type"&content="text/&Charset=gb2312"&/&
&6&title&无标题文档&/title&
<span style="color: #&form&action=""&name="form1"&method="post"&
<span style="color: #&&&p&地址:
<span style="color: #&&&&&input&type="text"&name="useradd"&/&
<span style="color: #&&&&&br&
<span style="color: #&&&&&br&
<span style="color: #邮编:
<span style="color: #&input&type="text"&name="code"&/&
<span style="color: #&&&/p&
<span style="color: #&&&p&您的姓名:
<span style="color: #&&&input&type="text"&name="username"/&&/p&
<span style="color: #&&&p&
<span style="color: #&&&&&input&type="submit"&value="保存"&/&
<span style="color: #&&&&&/p&
<span style="color: #&/form&
<span style="color: #&%&
<span style="color: #String&useradd&=&request.getParameter("useradd");
<span style="color: #String&code&=&request.getParameter("code");
<span style="color: #
<span style="color: #if(useradd!=null){
<span style="color: #String&username&=&request.getParameter("username");
<span style="color: #session.setAttribute("csname",username);
<span style="color: #out.println("您填写的地址是:"+useradd);
<span style="color: #out.println("&br&&br&");
<span style="color: #out.println("您填写的邮编是:"+code);
<span style="color: #out.println("&p&&a&href=\"check.jsp\"&下一步&/a&");
<span style="color: #}
<span style="color: #&%&
<span style="color: #
<span style="color: #&/body&
<span style="color: #&/html&
<span style="color: #
页面2:check.jsp
&1&%&#64;&page&contentType="text/&charset=gb2312"&language="java"&%&
&2&!DOCTYPE&html&PUBLIC&"-//W3C//DTD&XHTML&1.0&Transitional//EN"&"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&
&3&html&xmlns="http://www.w3.org/1999/xhtml"&
&5&meta&http-equiv="Content-Type"&content="text/&charset=gb2312"&/&
&6&title&无标题文档&/title&
<span style="color: #String&csname=(String)session.getAttribute("csname");
<span style="color: #out.println(csname);
<span style="color: #&%&
<span style="color: #&
<span style="color: #&/body&
<span style="color: #&/html&
<span style="color: #
index.html
&1&!DOCTYPE&html&PUBLIC&"-//W3C//DTD&XHTML&1.0&Transitional//EN"&"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&
&2&html&xmlns="http://www.w3.org/1999/xhtml"&
&4&meta&http-equiv="Content-Type"&content="text/&charset=gb2312"&/&
&5&title&首页&/title&
&9&form&action="check.jsp"&method="post"&
<span style="color: #&p&输入您的用户名
<span style="color: #&&&input&type="text"&name="username"&/&
<span style="color: #&/p&
<span style="color: #&p&输入您的密码:
<span style="color: #&&&input&name="pwd"&type="password"&value=""&/&
<span style="color: #&/p&
<span style="color: #&input&type="submit"&value="check&it!"&/&
<span style="color: #&/form&
<span style="color: #&/body&
<span style="color: #&/html&
<span style="color: #
&1&%&#64;&page&contentType="text/&charset=gb2312"&language="java"&import="java.sql.*"&errorPage=""&%&
&2&!DOCTYPE&html&PUBLIC&"-//W3C//DTD&XHTML&1.0&Transitional//EN"&"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&
&3&html&xmlns="http://www.w3.org/1999/xhtml"&
&5&meta&http-equiv="Content-Type"&content="text/&charset=gb2312"&/&
&6&!--&TemplateBeginEditable&name="doctitle"&--&
&7&title&checking.&/title&
&8&!--&TemplateEndEditable&--&
&9&!--&TemplateBeginEditable&name="head"&--&
<span style="color: #&!--&TemplateEndEditable&--&
<span style="color: #&/head&
<span style="color: #
<span style="color: #&body&
<span style="color: #&%&
<span style="color: #&
<span style="color: #&if(request.getParameter("username").equals("admin")){
<span style="color: #&response.sendRedirect("admin.jsp");
<span style="color: #&}
<span style="color: #&else{
<span style="color: #&response.sendRedirect("welcome.jsp");
<span style="color: #&}
<span style="color: #
<span style="color: #
<span style="color: #&%&
<span style="color: #&/body&
<span style="color: #&/html&
result Page:
user Page:welcome.jsp
&1&%&#64;&page&contentType="text/&charset=gb2312"&language="java"&import="java.sql.*"&errorPage=""&%&
&2&!DOCTYPE&html&PUBLIC&"-//W3C//DTD&XHTML&1.0&Transitional//EN"&"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&
&3&html&xmlns="http://www.w3.org/1999/xhtml"&
&5&meta&http-equiv="Content-Type"&content="text/&charset=gb2312"&/&
&6&title&无标题文档&/title&
<span style="color: #&h1&u&r&welcome!&br&
<span style="color: #欢迎进入用户会员中心&/h1&
<span style="color: #&/body&
<span style="color: #&/html&
admin Page:
&1&%&#64;&page&contentType="text/&charset=gb2312"&language="java"&import="java.sql.*"&errorPage=""&%&
&2&!DOCTYPE&html&PUBLIC&"-//W3C//DTD&XHTML&1.0&Transitional//EN"&"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&
&3&html&xmlns="http://www.w3.org/1999/xhtml"&
&5&meta&http-equiv="Content-Type"&content="text/&charset=gb2312"&/&
&6&title&Admin&/title&
<span style="color: #&h1&
<span style="color: #这里是后台管理&/h1&
<span style="color: #&/body&
<span style="color: #&/html&
<span style="color: #
&1&form&name&=&"form1"&method&=&"post"&action&=&"doit.jsp"&
&2//所有的表单程序必须写在form表单里
&3&input&type&=&"checkbox"&name&=&"color"&value&=&"color"红色&
&4&input&type&=&"checkbox"&name&=&"color"&value&=&"green"绿色&
&5&input&type&=&"checkbox"&name&=&"color"&value&=&"yellow"黄色&
<span style="color: #doit.jsp
<span style="color: #&%&#64;&page&contentType&=&"text/html";Charset&=&GBK;&%&
<span style="color: #&%
<span style="color: #String&color[]&=&request.getParameterValues("color");
<span style="color: #for(int&i&=&<span style="color: #;i&=color.length-<span style="color: #;i++){
<span style="color: #out.println("color"+color[i]+"&");
<span style="color: #}
<span style="color: #%&
<span style="color: #//request.getParameterValues("color")需要用数组来接收&&
同上!呵呵,先谢啦!
&1import&java.util.*;
&2class&TestReverse{
&3&public&static&void&main&(String[]&args)&{
&4&Scanner&s&=&new&Scanner(System.in);
&5&System.out.println("请随便输入!");
&6&String&str&=&s.nextLine();
&7&StringBuffer&s1&=&new&StringBuffer(str);
&8&System.out.println(s1.reverse());&
<span style="color: #}
public&class&Test&{&&&
&&&public&static&void&method1(int&i)&{&&&
&&&&&&&&if&(i&==&<span style="color: #)&{&&&
&&&&&&&&&&&&System.out.print("<span style="color: #*1=1\t\n");&&&
&&&&&&&&}&
&&&&&&&&else&{&&&
&&&&&&&&&&&&method1(i&-&<span style="color: #);&&&
&&&&&&&&&&&&for&(int&j&=&<span style="color: #;&j&&=&i;&j++)&{
&&&&&&&&&&&&&&&&System.out.print(j&+&"*"&+&i&+&"="&+&j&*&i&+&"\t");&&&
&&&&&&&&&&&&}&&&
&&&&&&&&&&&&System.out.println();&&&
&&&&&&&&}&&&
&&&&public&static&void&main(String[]&args)&{&&&
&&&&&&&&method1(<span style="color: #);&&&
以上代码等同于
public&class&Test&{&&&
&&&void&method1(int&i)&{&&&
&&&&&&&&if&(i&==&<span style="color: #)&{&&&
&&&&&&&&&&&&System.out.print("<span style="color: #*1=1\t\n");&&&
&&&&&&&&}&
&&&&&&&&else&{&&&
&&&&&&&&&&&&method1(i&-&<span style="color: #);&&&
&&&&&&&&&&&&for&(int&j&=&<span style="color: #;&j&&=&i;&j++)&{
&&&&&&&&&&&&&&&&System.out.print(j&+&"*"&+&i&+&"="&+&j&*&i&+&"\t");&&&
&&&&&&&&&&&&}&&&
&&&&&&&&&&&&System.out.println();&&&
&&&&&&&&}&&&
&&&&public&static&void&main(String[]&args)&{&&&
&&&&&&&&Test&a&=&new&Test();
&&&&&&&&a.method1(<span style="color: #);&&&
谁能给我讲讲吗?
呵呵,我是新手~老大们,不要bs啊~
This is a major failure of your software management system. Please check for broken packages with synaptic, check the file permissions and correctness of the file '/etc/apt/sources.list' and reload the software information with: 'sudo apt-get update' and 'sudo apt-get install -f'.
怎么办阿?
&1package&
&2import&java.io.*;
&3&import&javax.servlet.*;
&4&import&javax.servlet.http.*;
&5&public&class&HelloWorld&extends&HttpServlet
&7&&&&public&void&doGet(HttpServletRequest&request,HttpServletResponse&response)
&8&&&&throws&ServletException,IOException
<span style="color: #&&&&response.setContentType("text/html");&
<span style="color: #&&&&PrintWriter&out&=&response.getWriter();
<span style="color: #&&&&out.println("&html&&head&&title&");
<span style="color: #&&&&out.println("This&is&my&first&Servlet");
<span style="color: #&&&&out.println("&/title&&/head&&body&");
<span style="color: #&&&&out.println("&h1&Hello,World!&/h1&");
<span style="color: #&&&&out.println("&/body&&/html&");
<span style="color: #&&&
<span style="color: #&&&}
<span style="color: #&&&}
<span style="color: #
Status&500&-&
--------------------------------------------------------------------------------
type&Exception&report
description&The&server&encountered&an&internal&error&()&that&prevented&it&from&fulfilling&this&request.
exception&
javax.servlet.ServletException:&Error&allocating&a&servlet&instance
&&&&org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
&&&&org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
&&&&org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
&&&&org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
&&&&org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
&&&&java.lang.Thread.run(Unknown&Source)
root&cause&
java.lang.NoClassDefFoundError:&test/HelloWorld&(wrong&name:&HelloWorld)
&&&&java.lang.ClassLoader.defineClass1(Native&Method)
&&&&java.lang.ClassLoader.defineClass(Unknown&Source)
&&&&java.security.SecureClassLoader.defineClass(Unknown&Source)
&&&&org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
&&&&org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
&&&&org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
&&&&org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
&&&&org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
&&&&org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
&&&&org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
&&&&org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
&&&&org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
&&&&java.lang.Thread.run(Unknown&Source)
note&The&full&stack&trace&of&the&root&cause&is&available&in&the&Apache&Tomcat/6.0.18&logs.
--------------------------------------------------------------------------------
Apache&Tomcat/6.0.18
怎么办啊?
我参与的团队
专辑:J2EE入门教程-新浪播客
My other site!
积分与排名

我要回帖

更多关于 dnf川一土豪 的文章

 

随机推荐