Recent Posts
-
Does java have multidimensional arrays?
type[][] arrName; arrName = new type[length][] public class TwoDimensionTest { public static void main(String[]…… -
Struts 2 “#” symbol: get the data in the collection and select it
Syntax: list. {?#conditional expression>value} For example, if a collection contains multiple student objects, obta…… -
JSP JSTL < x: when > Tags: execute code according to conditions
< x: when select = "XPATHexpression" > body content < / X: when > Example <%@taglib prefix="x" uri="h…… -
Spring deleteall method: deletes all entity objects in the specified collection
deleteAll(Collection entities) Example public void delBoyUser(Collection users){ HibernateTemplate htm = getHiber…… -
Baidu know website development of Java project
Development background requirement analysis feasibility study System objectives System functional structure System flo…… -
Hibernate count method: returns the number of attributes
count(String propertyName) Example Criteria criteria = session.createCriteria(UserForm.class); //定义Criteria对象 …… -
Hibernate GT method: set greater than condition
gt(String propertyName,Object value) Example Criteria criteria = session.createCriteria(UserForm.class); //获取Crit…… -
JSP initparam object: get the value of the initialization parameter of the web application
${initParam.expression} Example <context-param> <param-name>author</param-name> <param-va…… -
Hibernate clear method: empty cache
clear() Example Session session = sessionFactory.openSession(); //定义Session UserForm uf = new UserForm(); //定…… -
JSP JSTL < SQL: transaction > tag: transaction
and statements isolationLevel:="read_committed" |"read_uncommitted" |"repeatable_read" |"serializabl…… -
Struts 2 bean tag: create and instantiate a JavaBean object
< s: bean name = "Fe. ZX. Person" > < s: param name = "username" value = "'Mr '" / > / / sub tag < s: p…… -
Java Gobang game (with source code and analysis)
import java.util.Scanner; public class Gobang { // 定义棋盘的大小 public static int BOARD_SIZE = 15; …… -
Hibernate default_ entity_ Mode attribute: Specifies the default entity representation mode
hibernate. default_ entity_ Mode = attribute value Example <property name="hibernate.default_entity_mode"> …… -
Tomcat installation and startup
In addition to tomcat, commonly used servlet containers include Weblogic, JBoss, webspher, etc. Selection of Tomcat ve…… -
Hibernate close method: close the sessionfactory object
close() Example sessionFactory = config.buildSessionFactory(); //创建SessionFactory对象 if(sessionFactory.isClosed…… -
Java collections classes: sort() ascending sort, reverse() descending sort, copy() copy, fill()
Forward sort Example 1 public class Test10 { public static void main(String[] args) { Scanner input = …… -
Hibernate Ge method: set the condition greater than or equal to
ge(String propertyName,Object value) Example Criteria criteria = session.createCriteria(UserForm.class); //创建Crit…… -
Struts 2 merge tag: merge collection tag
< s: merge id = "mm" > < s: param value = "{'Java Web development practice classic', 'JavaWeb example classic…… -
New method for map in Java 8
public class MapTest { public static void main(String[] args) { Map map = new HashMap(); // …… -
Struts2 ServletActionContext. Getservletcontext() method: get ServletContext object
public static ServletContext getServletContext() Example //获取上下文 ServletContext context = ServletActionContext…… -
JSP application. Getattribute () method: get attribute value
getAttribute(String name) Example <% application.getAttribute("user"); %> Typical application <body&g…… -
JSP Request. Getquerystring() method: get query string
getQueryString() Example <a href="https://www.jb51.ccindex.jsp?JavaCore">以Get方法发送的查询字符串</a>&l…… -
JSP Out. Print () method: output data to JSP page
Grammar 1 print(boolean b) Example <% out.print(3>2); %> Grammar 2 print(char c) Example <% …… -
JSP Request. Getremoteaddr() method: get the IP address of the requesting client
getRemoteAddr() Example <% String p = request.getRemoteAddr(); out.println("客户端的IP地址为:"+p); %> -
Java connection string
Using join operators Example 1 public static void main(String[] args) { int[] no=new int[]{501,101,204,102,334…… -
JSP application. Getattributenames() method: get all attribute names
getAttributeNames() Example <% Enumeration names = application.getAttributeNames(); while(names.hasMoreElem…… -
JSP Response. Getcharacterencoding () method: get the character encoding type of the response
getCharacterEncoding() Example <% String encode = response.getCharacterEncoding(); out.println("响应客户端…… -
JSP Out. Clear() method: clear the data in the buffer
clear() Example <% out.println("C语言中文网"); out.clear(); %> -
JSP Request. Getrequesturi () method: get the relative path of the website accessed by the client
getRequestURI() Example <% String p = request.getRequestURI(); out.println("访问的URI路径为:"+p); %> -
What is a URL? And URL class and urlconnection class
URL concept protocol://resourceName http://www.sun.com/ 协议名://主机名 http://localhost:8080/Test/admin/logi…… -
Java Connection. Commit() method: commit the transaction
commit() Example Connection conn = …… //省略部分代码 conn.setAutoCommit(false); //先将事务设为手动提交 Statement…… -
JSP application. Removeattribute() method: removes the specified attribute
removeAttribute(String name) Example <% application.setAttribute("user","lzw"); application.removeAttribute……