lt (RSS)

Grails development project from scratch 4

i18n mechanism Grails provides a sound i18n mechanism, specific documentation to see if / grails-app/i18n directory will understand. The default will be generated in various languages of the propertie ...

To springside a cardiac stimulant and re-ignite the enthusiasm of SSH framework 2

Connected to a <a href="http://lovephoenix.javaeye.com/admin/blogs/591383"> to springside a cardiac stimulant and re-ignite the enthusiasm of SSH architecture 1 </ a> The followi ...

The use of Java reflection and JPA wrote the 'universal' CRUD tools

On weekends, spent nearly four hours was a 'universal' in CRUD tools, but if you want to use JPA must be carried out using ORM operations. There the object mapped to the data table when, Id fi ...

servlet garbled characters appear in the solution

servlet garbled characters appear in the solution Method 1: In the servlet code to add the start of function body: response.setContentType ( "text / html; charset = UTF-8"); request.setChara ...

Grails development project from scratch 2

Download, install, configure Java, Groovy, Grails Meat opera come ~ As of today (February 8, 2010) The latest version is as follows: Java JDK 6 Update 17 http://java.sun.com/javase/downloads/index.jsp ...

Inside J2EE using log4j

Basically, the project is currently no development is not to the log management, and the present day management of most of the projects have adopted the apache's log4j, Here's a brief look at ...

Examples of spring integration quartz

Code is relatively simple, if there is wrong with, but also look enlighten! !

Using Freemarker generates a static html

Let us look at generating static html files: FreeMarker allows Java servlet to keep graphic design with the separation of application logic, which is sealed by the template HTML complete. The data pro ...

Seam project to build records (1)

1. SEAM 2.2 and still can not properly support JSF 2.0 Tried two days or Gaobu Ding, seam of the phase analysis of the jsf appeared NullPointException, in exchange for jsf1.2 no problem, SEAM official ...

Why should there be a one-way association

http://www.java1995.cn/blog/item/113 hibernate official recommended a two-way association, then the one-way associated with what is the use? In fact, this useful useless, not from the technical direct ...

Hibernate mapping one to one relationship between

Using the relationship between man and identity Person class has three attributes IdCard class has three attributes The first case, the primary key association (person class positioning the main table ...

Hibernate-to-many and many-to-relational mapping

The use of the relationship between departments and staff Department (Department) has three attributes, set the get and set methods Employees (Employee) also has three attributes, respectively, get an ...

Extended ApacheCommos of DbUtils

The DbUtils is a simple ApacheCommos easy to use lightweight tools for database operations, the project's home page is: http://commons.apache.org/dbutils/, information about it can get from there. ...

JSP_Servlet_JavaBean Quick Start (2. Servlet explain)

Quote: JSP_Servlet_JavaBean Quick Start (1, JavaEE Overview) 1. What is a Servlet? Servlet (Java server applets) using Java server-side program written in is determined by the server-side calls and im ...

java regular expressions to achieve

Nepal may be encountered at work need to obtain one or a number of variables inside the http response, this time the role of regular expressions are embodied, and in general work, a lot of use to the ...

struts1.x File Upload

jsp form page (upload.jsp) ActionForm Action xml file configuration

struts1.x Dynamic ActionForm

jsp page (dynaform.jsp) xml file configuration Action configuration (DynaFormAction)

struts1.x tags

1, beanwrite label action in the scope of the request to set the following properties Back to the jsp page to display labels with beanwrite 2, logic tags (logical judgments) Back to jsp page tags to u ...

On how to debug a webapp using maven to create

There are many ways to debug webapp can be directly installed server, Can also be installed maven-jetty-plugin, maven-tomcat-plugin plug-ins In addition to these, but also can be directly embedded jet ...

Three-step easy java restful web services

restful web services, I believe for most readers no longer a new term, on-line can be found to the information is voluminous, numerous, it will not go into at this myself, only to provide a number of ...

Nothing to write a file to determine the same java program segment

Nothing to write a file to determine the same java program segment

Forget that is a mistake.

If you forget a mistake, I do not want to repeat the mistakes again. Write it down. <mapper resource="com/company/blog/sqlmap/testMapper.xml" /> In the configuration file you forgot to ...

Struts2 tags to obtain the value of requestURI.contextPath

Struts2 tags to obtain the value of requestURI.contextPath

Tomcat multi-port, multi-virtual host configuration

Tomcat greater use in the development environment, but sometimes also done production environment. In a production environment will be encountered more needs to be placed in a tomcat multiple sites un ...

JForum source code analysis notes

My development environment: JForum2.1.8 tomcat5.X JDK 1.6X Routines can not be refined in order to start. From the beginning web.xml web.xml includes a filter, a listener, and two servlet, not much co ...

You look at the difference between StringBuilder and StringBuffer it?

You look at the difference between StringBuilder and StringBuffer it? The two string classes, it is estimated there in front of me a couple of years old, but I have been concerned about the difference ...

The spring has gone again, BUG no more will come back!

Evil bug, take a look at all such a stupid Mody: 1. Using the sequence when you use select max (id) from table; ------- too violent, and direct data recorded chaos 2. Multi-layer for the time loop, th ...

java servlet container

Used or intend to use the java server has a resin, tomcat, jetty. 1.tomcat is a standard j2ee implementation, the user may also be more. Tomcat, but more and more, updated more and more slowly, recent ...

ofbiz multi-table foreign key related inquiries

To achieve a: Screem.xml in the section, the increase <action>, plus get-related Achieve the two: the use of DynamicViewEntity object in your code, add addMemberEntity, addAlias, addViewLink, th ...

In the development of Liferay's pulgin found a picture record of positioning

I have to use methods developed by pulgin (that is, by the way pulgin SDK development) in the development process, I found the picture url definition of strange. Instance, to develop a portlet: Name: ...

spring 2.5.6 and hibernate3.2.2 Integration (4)

The source of this Liezi springside under miniweb project as a way to springside study concluded, GM dao, unit test. 1. Databases and tables are still the second demo of. 2. Entity class or a second d ...

spring 2.5.6 and hibernate3.2.2 Integration (3)

Recently looked at springside, learn a lot, from the ideological to the coding style, here re-nonsense look, thought this thing quite true, but not only realize unspeakable, a number of things you wan ...

java code for the page

Recent studies have crawled pages, and discovered to obtain the page's encoding format, Java implementations is not ready, although there are a csdn Daren wrote an article, with code, unfortunatel ...

DWR integration in and spring when the bug, SpringCreator.getType???

DWR integration in and spring, when, in the dwr.xml will set creator = "spring", to tell dwr will use dwr to org.directwebremoting.spring.SpringCreator to create an object instance, but it i ...

About JAVA custom exceptions

To control the use of custom exceptions generated random number is not even! Hehe now review stage, the small circling the examples out on the share, the welcome given to criticizing

The proper use of ThreadPoolExecutor

Has been used Executors.newFixedThreadPool (10) in such a way to create a thread pool. This factory method to create ThreadPoolExecutor the actual object, its constructor has three main parameters of ...

Ibatis3 in the if test to determine the conditions inside the analytic problem

Ibatis3 encountered a problem today, sql inside if a variable of type String in the right to write to judge the conditions are as follows: <if test="userYNFlag =='Y'"> AND use_ ...

A simple method to test procedures for small-Speed

public static void main (String [] args) ( Long start = System.currentTimeMillis (); long sum = 0; for (long i = 1; i <520000l; i + +) ( sum + = i; ) Long end = System.currentTimeMillis ();// get c ...

Summarized the basis of multi-threaded 11 - ConcurrentLinkedQueue

ConcurrentLinkedQueue full use of the atomic package implementation has created a non-thread-safe lock concurrent queue too. Contrast to the lock mechanism to achieve the individual that the use of no ...

struts2 using kindeditor upload pictures (including jmagic compressed images)

Project uses a kindeditor3.4 UploadContentImgAction ImageUitl

struts2 in action call

1, Action categories: public class IndexAction3 extends ActionSupport ( @ Override public String execute () ( return SUCCESS; / / inherited ActionSupport inside the execute () method. ) ) 2, Action ca ...

JPA handle carriage return problem!

Hello All, Add carriage return character to use JPA feasible, but Optimistic lock, the query out, and then deleted, Will be reported [Reason = <openjpa-1.1.0-r422266:657916 nonfatal store error> ...

JSF tag not have to pass the value of the carriage return!

Hello All, JSF <f:param value="person.name"/> tag value value can not have a carriage return, If there is a carriage return will affect the page display, nor reported any errors. Deal ...

spring2 the way through jdbc to read. update the database clob or blob type of data

Today, due to the need for the project must be spring the way through jdbc to read and update the clob types of data, just the beginning, I get a data connection directly through the spring and then u ...

eclipse birt use a script to achieve Wrap

Use Eclipse Birt for some time, right birt function is still relatively satisfied with the work to meet the basic needs, of course, there are some undesirable areas, such as the birt of data in a long ...

Several methods of java operating XMLType

XMLType is the oracle database-specific data types can be used to store a xml, through java (This article uses the jdbc) Insert XMLType parameters according to the type of sql usually have the followi ...

Set-LinkedList and ArrayList Summary

1. Both the UML inheritance diagram: 2. Both are implemented: ArrayList: Internal data access using the array to achieve RandomAccess interface, support for random access LinkedList: Internal use link ...

Recognizing spring Services

ps: this article a few months ago, finishing well, with reference to a lot of good articles, to learn the essence of them + some of their own understanding, share je friends! Spring framework is one i ...

HIBERNATE Calling Stored Procedure

1. Building tables and initialization of the test data in mysql database, create a new table: tbl_user, to build the table statement as follows: DROP TABLE IF EXISTS `user`; CREATE TABLE `tbl_user` ( ...

Java programmers use the Grails Ten Advantages

There is no royal Web development, PHP market is large, but RoR, Python, Java, occupies the side till Asp.net market. So as a Java programmer, if you do not want to use SSH to do when the site and try ...