`
文章列表
Problem 这主要是由于Maven导入的struts2-core引起的。   Solution Zero -vm D:\Program Files\Java\jdk1.6.0_35\bin\javaw.exe -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx768m -XX:MaxPermSize=256m     Solution One ... <dependencies> <dependency> <groupId>org.apache.str ...

jQuery Essential

        Notice : As of jQuery 1.7, the .live() method is deprecated. Use .on() to attach event handlers. Users of older versions of jQuery should use .delegate() in preference to .live().    具体的例子可以查看jquery文档 http://docs.jquery.com/Main_Page 进行参考; 或访问http://marcgrabanski.com/。
当使用Eclipse或STS,开发JSF2.0应用的时候,以.xhtml格式结尾的文件,当使用代码自动补全,没有任何提示。   解决方法: 选中工程--> Alt+Enter   勾选右边的JavaServer Faces, 之后再选择下面的Further configuration available...     导入相应的JSF库,我这里选择的是Oracle提供的Mojarra 2.1.6-FCS 配置完成后      

Struts 2 日期处理

1.日期格式化 demo1 <s:textfield name="contact.birthDate" label="ContactBirthDate"> <s:param name="value"> <s:date name="contact.birthDate" format="yyyy-MM-dd" /> </s:param> </s:textfield>     demo2 <input type ...
1.pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4 ...
1. Tomcat Authentication %CATALINA_HOME%/conf/tomcat-users.xml   ... <role rolename="admin-script"/> <role rolename="manager-gui" /> <user username="tomcat" password="tomcat" roles="manager-gui, admin-script" /> ...  为了成 ...
1.schema.sql alter table student_course drop foreign key FKB0A3729FA6819B7; alter table student_course drop foreign key FKB0A3729FA135F25D; drop table if exists course; drop table if exists student; drop table if exists student_course; create table course (cid integer not null auto_increment, ...
0.pom.xml ...... <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <hibernate-version>3.6.10.Final</hibernate-version> <javassist-version>3.12.1.GA</javassist-version> <slf4j-nop-version>1.6.6</slf4j-nop ...
0.pom.xml ...... <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <hibernate-version>3.6.10.Final</hibernate-version> <javassist-version>3.12.1.GA</javassist-version> <slf4j-nop-version>1.6.6</slf4j-nop- ...
0.pom.xml ...... <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <hibernate-version>3.6.10.Final</hibernate-version> <javassist-version>3.12.1.GA</javassist-version> <slf4j-nop-version>1.6.6</slf ...
1. Get Dependency Library Get the struts2-convention-plugin.jar, struts2-json-plugin.jar library. pom.xml   <dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-core</artifactId> <version>${struts-version}</version> </ ...
实现HttpSessionListener接口  package org.fool.simpleservlet.listener; import javax.servlet.annotation.WebListener; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; @WebListener public class OnlineUserListener implements HttpSessionListener { priva ...
工程目录 程序代码package org.fool.servlet; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.FileInputStream; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServle ...

Thread common example

    博客分类:
  • Java
1.设计 4 个线程,其中两个线程每次对 j增加1,另外两个线程对j每次减少1。 public class ThreadTest { public static void main(String[] args) { MyThread thread = new MyThread(); for (int i = 0; i < 2; i++) { Thread inc = new Thread(new Inc(thread)); Thread dec = new Thread(new Dec(thread)); inc.start(); ...
The classic example in OOP is the “shape” example. This is commonly used because it is easy to visualize, but unfortunately it can confuse novice programmers into thinking that OOP is just for graphics programming, which is of course not the case.   The shape example has a base class called Shape a ...
Global site tag (gtag.js) - Google Analytics