• JSP expression use details


    JSP expressions are used to output information to the page, and the syntax format is as follows: <%= expression %> Parameter description: Expression: can be the full expression of any Java speech. The final result of the expression is converted to a string. Here are some simple examples: <%@ page language=”java” import=”java.util.*” contentType=”text/html; charset=UTF-8″ pageEncoding=”UTF-8″%> […]

  • Spring enables secondary cache instance details when integrating Hibernate


    Spring enables secondary cache instance details when integrating Hibernate Write in front: 1. This example USES Hibernate3 + Spring3; 2. The query of this example USES HibernateTemplate; 1. Import ehcache-x.x.x.jar package; 2. Find the corresponding configuration information of sessionFactory in the applicationcontext. XML file and add the following code in setting hibernateProperties: <! — configure […]

  • The arrangement of Maven configuration files in spring


    Spring Maven configuration file collation Maven configuration files of spring packages <!–spring-context–> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>4.2.2.RELEASE</version> </dependency> <!–spring aop–> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <version>4.2.2.RELEASE</version> </dependency> <!– spring aspect–> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> <version>4.2.2.RELEASE</version> </dependency> <!–spring beans–> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>4.2.2.RELEASE</version> </dependency> <!–spring context support–> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>4.2.2.RELEASE</version> </dependency> <!–spring core–> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>4.2.2.RELEASE</version> </dependency> <!– […]

  • Detailed introduction of spring AOP agent


    Detailed introduction of spring AOP agent Preface: At the beginning, I still knew little about spring AOP. I met a problem these days, and I checked some spring related knowledge. I felt that I had a deeper understanding of this problem. So write it down and share it. As we know, spring supports a variety […]

  • Detailed description of filter selection filter in JSP


    Examples are as follows: public class LoginCheckFilter implements Filter { private FilterConfig config=null; private String webroot=null; public void destroy() { // TODO Auto-generated method stub } @Override public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException { // TODO Auto-generated method stub HttpServletRequest request=(HttpServletRequest)req; HttpServletResponse response=(HttpServletResponse)resp; Httpsession session = request. Getsession (false); // […]

  • JSP filter filter configuration filter type all summary


    I. configuration method 1 map filter all resources in the application <filter> <filter-name>loggerfilter</filter-name> <filter-class>myfilter.LoggerFilter</filter-class> </filter> <filter-mapping> <filter-name>loggerfilter</filter-name> < URL pattern > / * < / url pattern > // access the current host. All files under the root of the current application include all files under the multi-level subdirectory. Note that there is “/” in […]

  • Use rich text editor to upload picture example details


    Upload pictures in rich text editor I. import JS of kindeditor <script type=”text/javascript” charset=”utf-8″ src=”/js/kindeditor-4.1.10/kindeditor-all-min.js”></script> <script type=”text/javascript” charset=”utf-8″ src=”/js/kindeditor-4.1.10/lang/zh_CN.js”></script> 2. Associate the kindeditor with a text field textarea, that is, initialize a kindeditor object with textarea itemAddEditor = TAOTAO.createEditor(“#itemAddForm [name=desc]”); //Initialize category selection and picture uploader TAOTAO.init({fun:function(node){ TAOTAO.changeItemParam(node, “itemAddForm”); }}); 3. Set parameters to upload […]

  • The method of JSP taking multiple parameters to the background


    Examples are as follows: <a href=”javascript:tiao(‘${}’,’${li.fplxdm}’);” rel=”external nofollow” > function tiao(id,fpxldm){ window.location = “${sbjkgl}/w/fp/pageDetail?id=”+id+”&fpxldm=”+fpxldm; } The method of bringing multiple parameters to the background in the above JSP is the whole content shared by Xiaobian. I hope it can give you a reference, and I hope you can support developepaer more.

  • Summary of Four Ways to Transfer Parameters from JSP to Background


    The method of passing value to the JSP page First,The client submits the transfer value through the Form form to the server through the Form form, and the server through the Form form. Java code request.getParameter(String xx); To get the parameter (XX) as the parameter name. Submit by get/post Two.Pass values through hidden domains By […]

  • Detailed Introduction to Common Annotations in Spring


    Writing of configuration files when annotations are used in spring: <?xml version=”1.0″ encoding=”UTF-8″?> <span style=”font-size:18px;”><beans xmlns=”” xmlns:xsi=”” xmlns:context=”” xmlns:aop=”” xsi:schemaLocation=””> <aop:aspectj-autoproxy/> <context:annotation-config/> <context:component-scan base-package=”com.test” /> </beans> <context:component-scan />Configuration items are configured to scan the specified package for dependency injection. The use of the following common annotations is […]

  • JSP + Servlet Implementation Generating Logon Authentication Code Example


    Randomly generate four digit verification code, including Chinese characters, numbers, English case. Class 1.Servlet package servlet; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.AffineTransform; import java.awt.geom.Line2D; import java.awt.image.BufferedImage; import; import; import java.util.Random; import javax.imageio.ImageIO; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; public class PictureCheckCode extends HttpServlet […]

  • Differences between @ Autowired and @ resource annotations in spring framework


    Differences between @ Autowired and @ resource annotations in spring framework In the spring framework, in addition to its unique annotations, JSR-250-based annotations are used, which include @PostConstruct, @PreDestroy and @Resource annotations. First, let’s briefly understand the @ postconstruct and @ predestroy annotations: To define the installation and uninstallation of a bean, we can use […]