
java学习笔记
文章平均质量分 74
panjone
这个作者很懒,什么都没留下…
展开
-
eclipse安装SVN报错
eclipse安装SVN报错。地址:http://subclipse.tigris.org/update_1.8.x错误消息:An error occurred while collecting items to be installedsession context was:(profile=epp.package.jee, phase=org.eclipse.equinox.int转载 2016-06-07 00:45:14 · 11141 阅读 · 3 评论 -
hibeinate的annotation使用说明
/*** 注释说明: * @Entity —— 将一个类声明为一个实体bean(即一个持久化POJO类) * @Id —— 注解声明了该实体bean的标识属性(对应表中的主键)。 * @Table —— 注解声明了该实体bean映射指定的表(table),目录(catalog)和schema的名字 * @Column —— 注解声明了属性到列的映射。该注解有如下的属性转载 2012-06-18 09:16:11 · 923 阅读 · 0 评论 -
Struts 2 Results and Result Types
As mentioned previously, the tag plays the role of aview in the Struts2 MVC framework. The action is responsible for executing the business logic. The next step after executing the business logic i转载 2012-06-19 10:41:45 · 734 阅读 · 0 评论 -
Struts 2 Configuration Files
This chapter will take you through basic configuration required for a Struts 2 application. Here we will see what will be configured in few important configuration files :web.xml, struts.xml, struts转载 2012-06-19 10:39:06 · 977 阅读 · 0 评论 -
Struts 2 Hello World Example
As you learnt from the Struts 2 architecture, when you click on a hyperlink or submit an HTML form in a Struts 2 web application, the input is collected by the Controller which is sent to a Java class转载 2012-06-19 10:37:51 · 711 阅读 · 0 评论 -
Basic MVC Architecture
Model View Controller or MVC as it is popularly called, is a software design pattern for developing web applications. A Model View Controller pattern is made up of the following three parts:Mo转载 2012-06-19 10:34:43 · 497 阅读 · 0 评论 -
Struts 2 Quick Guide
Struts2 is popular and mature web application framework based on the MVC design pattern. Struts2 is not just the next version of Struts 1, but it is a complete rewrite of the Struts architecture.The翻译 2012-06-19 10:33:33 · 1677 阅读 · 0 评论 -
Struts 2 and Hibernate Integration
Hibernate is a high-performance Object/Relational persistence and query service which is licensed under the open source GNU Lesser General Public License (LGPL) and is free to download. In this chapte转载 2012-06-19 10:31:52 · 974 阅读 · 0 评论 -
Struts 2 Data Tags
The Struts 2 data tags are primarily used to manipulate the data displayed on a page. Listed below are the important data tags:The action tag:This tag enables developers to call actions directly f转载 2012-06-19 10:26:35 · 503 阅读 · 0 评论 -
Struts 2 Annotations
As mentioned previously, Struts provides two forms of configuration. The traditional way is to use thestruts.xml file for all the configurations. We have seen so many examples of that in the tutorai转载 2012-06-19 10:24:36 · 638 阅读 · 0 评论 -
ssh搭建及其配置
三大框架SSH所用jar包及项目机构图:见附件图片文件 struts.xmlXml代码 xml version="1.0" encoding="UTF-8"?> "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.o转载 2012-06-19 08:41:41 · 489 阅读 · 0 评论 -
Struts 2 - The Ajax Tags
Struts uses the DOJO framework for the AJAX tag implementation. First of all, to proceed with this example, you need to add struts2-dojo-plugin-2.2.3.jar to your classpath. You can get this file from转载 2012-06-19 10:28:19 · 560 阅读 · 0 评论 -
Struts 2 Actions
Actions are the core of the Struts2 framework, as they are for any MVC (Model View Controller) framework. Each URL is mapped to a specific action, which provides the processing logic necessary to serv转载 2012-06-19 10:40:03 · 602 阅读 · 0 评论 -
Struts2 Value Stack/OGNL
The Value Stack:The value stack is a set of several objects which keeps the following objects in the provided order:SNObjects & Description1Temporary ObjectsThere are various tem转载 2012-06-19 10:42:42 · 785 阅读 · 0 评论 -
strtuts+ajax 用户名无刷新验证简单实例
AjaxAction:package ajax.demo;import java.util.ArrayList;import java.util.List;import ajax.model.User;import com.opensymphony.xwork2.ActionSupport;public class AjaxAction extends ActionSup原创 2013-04-30 20:05:23 · 714 阅读 · 0 评论 -
Struts 2 and Tiles Integration
In this chapter, let us go through the steps involved in integrating the Tiles framework with Struts2. Apache Tiles is a templating framework built to simplify the development of web application user转载 2012-06-19 10:30:21 · 739 阅读 · 0 评论 -
Struts 2 and Spring Integration
Spring is a popular web framework that provides easy integration with lots of common web tasks. So the question is, why do we need Spring when we have Struts2? Well, Spring is more than a MVC framewor转载 2012-06-19 10:29:18 · 830 阅读 · 0 评论 -
Struts 2 - The Form Tags
The list of form tags is a subset of Struts UI Tags. These tags help in the rendering of the user interface required for the Struts web applications and can be categorised into three categories. This转载 2012-06-19 10:27:29 · 1054 阅读 · 0 评论 -
Struts 2 Annotations Types
Struts 2 applications can use Java 5 annotations as an alternative to XML and Java properties configuration. Here is the list of most important annotations related to different categories:Namespace转载 2012-06-19 10:10:45 · 510 阅读 · 0 评论 -
hibeinate中类的关联问题
一对一(One-To-One)使用@OneToOne注解建立实体Bean之间的一对一关联。一对一关联有三种情况:(1).关联的实体都共享同样的主键,(2).其中一个实体通过外键关联到另一个实体的主键(注意要模拟一对一关联必须在外键列上添加唯一约束),(3).通过关联表来保存两个实体之间的连接关系(要模拟一对一关联必须在每一个外键上添加唯一约束)。 1.共享主键的一对一关联映射:@E转载 2012-06-18 08:45:13 · 644 阅读 · 0 评论 -
Struts 2 File Uploads
The Struts 2 framework provides built-in support for processing file uploads using "Form-based File Upload in HTML". When a file is uploaded it will typically be stored in a temporary directory and th转载 2012-06-19 10:43:20 · 780 阅读 · 0 评论 -
Struts 2 Interceptors
Interceptors are conceptually the same as servlet filters or the JDKs Proxy class. Interceptors allow for crosscutting functionality to be implemented separately from the action as well as the framewo转载 2012-06-19 10:40:50 · 1364 阅读 · 0 评论 -
Struts 2 Architecture
From a high level, Struts2 is a pull-MVC (or MVC2) framework. The Model-View-Controller pattern in Struts2 is realized with following five core components:ActionsInterceptorsValue Stack转载 2012-06-19 10:35:59 · 611 阅读 · 0 评论 -
Struts 2 Control Tags
The Struts 2 tags have a set of tags that make it easy to control the flow of page execution. Following is the list of important Struts 2 Control Tags:The if and else tags:These tags perform basic转载 2012-06-19 10:25:42 · 505 阅读 · 0 评论 -
Spring3.0、Hibernate3.0、Struts2整合文件配置
一、导入Spring3.0、Hibernate3.0、Struts2开发库。二、配置web.xml文件的内容,如下: index.jsp Spring core configuration org.springframework.web.context.ContextLoaderListener转载 2012-06-18 16:57:59 · 1272 阅读 · 0 评论 -
google使用列表2
Just open the Google.com And then Type The Following Axis:inurl:"view/indexFrame.shtml"inurl:"view/index.shtml"intitle:"Live View / - AXIS"intitle:axis cameraintitle:"axis #Kameram原创 2012-05-22 19:59:34 · 1073 阅读 · 0 评论 -
java简单记事本
import java.awt.*;import java.awt.event.*;import javax.swing.*;import java.io.*;import java.lang.*; class MyFrame implements ActionListener{ Frame myframe; TextArea jta; publi原创 2012-02-23 17:20:36 · 462 阅读 · 0 评论 -
java—关于String
关于String常用的一些方法: indexof(int start) // 返回指定字符在此字符串中第一次出现处的索引。indexof(String str) //返回指定子字符串在此字符串中第一次出现处的索引。indexOf(int ch, int fromIndex) //返回在此字符串中第一次出现指定字符处的索引,从指定的索引开始搜索。lastindexof原创 2011-12-15 14:47:56 · 460 阅读 · 0 评论 -
java_接口 Lock
public interface LockLock 实现提供了比使用 synchronized 方法和语句可获得的更广泛的锁定操作。此实现允许更灵活的结构,可以具有差别很大的属性,可以支持多个相关的Condition 对象。 锁是控制多个线程对共享资源进行访问的工具。通常,锁提供了对共享资源的独占访问。一次只能有一个线程获得锁,对共享资源的所有访问都需要首先获得锁。不过,某原创 2011-12-15 14:25:54 · 527 阅读 · 0 评论 -
java等待唤醒机制
//等待唤醒机制 /*** 等待的线程放在线程池 wait()、notify()、notifyall()都使用在同步中,因为要对持有监视器(锁)的线程操作。所以要使用在同步中,因为只有同步才具有锁。为什么这些操作线程的方法要定义Object类中呢?因为这些方法操作同步中的线程时,都必须要表示它们所操作线程持有的锁,只有同一个锁上的被等待线程,可以被同一个锁上的not原创 2011-12-13 10:57:51 · 763 阅读 · 0 评论 -
java线程——死锁
/* // 死锁 // 死锁,将两个或多个锁相互嵌套,就由死锁的现象。 // 单例设计模式: // 饿汉式: class Single { private static Single s=new Single(); public static Single getinstanc原创 2011-12-12 09:18:12 · 442 阅读 · 0 评论 -
java 排序二
import java.util.*;class Student implements Comparable { public Student(String name,int age,int score) { this.name=name; this.age=age; this.score=score;原创 2011-12-12 11:08:57 · 452 阅读 · 0 评论 -
java线程一
/*java笔记:1、线程:线程是进程的控制单元,一个进程中至少有一个线程;线程控制这进程的执行。2、创建线程:*/ //这个例子中至少有三个线程 class myThread extends Thread //继承类Thread 我出现过的错误:class前加了public 当前文件下使用公共类前要先声明 { String st原创 2011-12-12 09:19:57 · 317 阅读 · 0 评论 -
java 中排序问题
package practising;public class Student { public Student(String name,int age,int score) { this.name=name; this.age=age; this.score=score; } private String name; pri原创 2011-12-12 09:43:48 · 459 阅读 · 0 评论 -
java复制文件
import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;public class CopyFile { public boolean co原创 2011-12-12 09:23:53 · 346 阅读 · 0 评论 -
java线程二
/* 1、 线程的状态: start()--->启动--->临时状态(等待cpu执行)------->运行--------sleep(time)、wait()----->冻结 冻结-----sleep时间到、notify()唤醒---------临时状态------>运行-----原创 2011-12-12 09:21:55 · 357 阅读 · 0 评论 -
java 异常处理
package com.demo.ExceptionDemo;public class ExceptionDemo {/*** @param args*/public static void main(String[] args) {// TODO Auto-generated method stub // try{ new Excep(原创 2012-04-12 18:23:04 · 420 阅读 · 0 评论 -
mysql插不了中文的问题
Enter password: *********Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 402Server version: 5.5.23 MySQL Community Server (GPL)Copyright (c) 2000, 2011, Or原创 2012-04-27 17:37:24 · 531 阅读 · 0 评论 -
java动态代理设计模式
代理设计模式 代理是一种常用的设计模式,其目的就是为其他对象提供一个代理以控制对某个对象的访问。代理类负责为委托类预处理消息,过滤消息并转发消息,以及进行消息被委托类执行后的后续处理。代理模式的作用是:为其他对象提供一种代理以控制对这个对象的访问。在某些情况下,一个客户不想或者不能直接引用另一个对象,而代理对象可以在客户端和目标对象之间起到中介的作用。代理模式一般涉及到的角转载 2012-04-29 09:42:24 · 585 阅读 · 0 评论 -
google搜索命令列表
inurl:"viewerframe?mode=motion" live webcamintitle:"live view/-axis" more live webcaminurl:lvappl intitle:liveappletintitle:"wj-nt104 main"intitle:"snc-rz30home"intitle:phpmyadmin"welcome to原创 2012-05-22 19:48:58 · 3694 阅读 · 0 评论