包含标签:Java 的文章
-
JSP JSTL < SQL: transaction > tag: transaction
and statements isolationLevel:="read_committed" |"read_uncommitted" |"repeatable_read" |"serializabl…… -
JSP Response. Setattibute() method: sets the attribute value of the specified name
setAttribute(String name,Object value) Example <% session.setAttribute("information","向session中保存数据"); …… -
JSP JSTL < C: fortokens > tag: output tag by iterating the string
< C: fortokens items = "string" delims = "char" [var = "name"] [begin = "start"] [end = "end"] [Step = "len"] [vars…… -
What technology stacks do Ali P8 Java senior architects need to master?
Overall architecture design of intelligent Internet Philosophical essence of Internet super large scale architecture d…… -
Development of local information website of Java project (similar to 58 local)
Development background System objectives System functional structure System flow System Preview Build development envi…… -
JSP JSTL < C: redirect > tag: redirect tag
Syntax format 1: …… Syntax format 2: Example <%@taglib prefix="c" uri="http://java.sun.com/jsp/j…… -
Spring getservletcontext method: get ServletContext context
getServletContext() Example public class LoginAction extends AbstractController{ @Override protected ModelAn…… -
Java try catch statement
try { 逻辑代码块1; } catch(ExceptionType e) { 处理代码块1; } Example 1 import java.util.Scanner; pu…… -
Spring queryforlong method: single value query method of long type
Grammar 1 queryForLong(String sql) Example public long getUserCount(){ String sql = "SELECT count(*)FROM tb_user"…… -
Get annotation information through reflection
Example 1 /** * 这是自定义注解的类 */ @Target({ ElementType.TYPE,ElementType.METHOD }) @Retention(RetentionPolic…… -
Spring save method: saves the entity object
save(Object entity) Example public static void main(String[] args){ ApplicationContext context = new ClassPathXml…… -
JSP sessionscope object: an implicit object that accesses the session scope
${sessionScope.expression} Example ${sessionScope.user} Typical application <body> <p>EL对象使用<…… -
Hibernate wascommitted method: judge whether the transaction is committed
wasCommitted() Example session.saveOrUpdate(uf); //调用插入数据方法 if(tx.wasCommitted()){ //判断事务是否已经被提…… -
JSP JSTL < C: choose > Tags: select Tags
< C: choose > < C: when > business logic < / C: when >... <-- Multiple < C: when > tags -- …… -
Hibernate connection. Password property: Specifies the database connection password
hibernate. connection. Password = attribute value Example 1 <property name="hibernate.connection.password"><…… -
Hibernate clear method: empty cache
clear() Example Session session = sessionFactory.openSession(); //定义Session UserForm uf = new UserForm(); //定…… -
Struts2 ActionContext. Getapplication () method: get the application object of map type
public Map getApplication() Example Typical application Info value in the request range: Info value in the session ran…… -
Spring drivermanagerdatasource class: Drive Manager data source
Grammar 1 DriverManagerDataSource() Example DriverManagerDataSource driverManagerDataSource = new DriverManagerDataS…… -
Spring getconnectionproperties method: get database connection properties
getConnectionProperties() Example public static void main(String[] args){ String driver = "com.MysqL.jdbc.Driver"…… -
Java RandomAccessFile class: dynamic reading of file contents
Example 1 public class RandomAccessFileDemo { public static void main(String[] args) { try { …… -
Implementation of java example air ticket discount in low and peak seasons
Use if else statement to realize air ticket discount in low and peak seasons public static void main(String[] args) …… -
Java interface: definition and implementation of interface, definition and implementation of interface
Define interface public interface A { publicA(){…} // 编译出错,接口不允许定义构造方法 } public interface…… -
Spring batchupdate method: execute batch update statement
batchUpdate(String[] sql) Example public static void main(String[] args){ ApplicationContext context = new ClassP…… -
JSP Request. Getsession () method: get the session object related to the request
getSession(boolean create) Example <% HttpSession ses = request.getSession(true); out.println("客户端sessio…… -
JSP JSTL < x: param > tag: define parameters
parameter value Example <%@taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%> <%@taglib…… -
JSP JSTL < SQL: setdatasource > tag: set data source
Example 1 <%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%> 连接Sql Server 2000数据库 &…… -
JSP header object: get a specific header value of HTTP request
${header.expression} Example ${header.host} ${header[host]} -
Hibernate hibernate. transaction. factory_ Class attribute: sets the transaction management type
hibernate. transaction. factory_ Class = attribute value Example <property name="hibernate.transaction.factory_cl…… -
Struts2 ActionContext. Getcontext () method: get actioncontext object
public static ActionContext getContext() Example //获取ActionContext对象 ActionContext context = ActionContext.getC…… -
Hibernate between method: set the condition between the two
between(String propertyName,Object lo,Object hi) Example Criteria criteria = session.createCriteria(UserForm.class);…… -
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 buildsessionfactory method: build sessionfactory
buildSessionFactory() Example Configuration config = new Configuration().configure(); //创建Configuration对象 Sess……