Category:JSP

  • JSP filter filter function and simple usage example

    Time:2020-8-12

    This paper describes the function and simple usage of JSP filter. For your reference, the details are as follows: What is the function of the filter? Filters can dynamically intercept requests and responses to transform or use the information contained in the request or response. You can attach one or more filters to a servlet […]

  • An example of simple MVC pattern implemented by JSP

    Time:2020-8-11

    This paper describes the simple MVC mode of JSP implementation. For your reference, the details are as follows: jsp : java servlet page The full name of MVC is model view controller, which is the abbreviation of model view controller. It is a software design model. It organizes the code by separating business logic, data […]

  • SSM framework JSP uses layui to achieve layer pop-up effect

    Time:2020-8-10

    In the recent system, using layui as the front-end framework is using the layer pop-up layer provided by layui. The effect picture is as follows. First of all, import the CSS and JS files required by layui. There is no need to say more about this. However, there is a key step that must be […]

  • JSP Web page to achieve Snake game

    Time:2020-8-9

    This example for you to share JSP Web page to achieve Snake game specific code, for your reference, the specific content is as follows 1、 Main ideas (1) The first step is to implement the map.(2) The second step is to realize the snake body.(3) The third step is to achieve food.(4) The fourth step […]

  • JSP to achieve simple user login free within 7 days

    Time:2020-8-7

    In this paper, we share the JSP implementation of simple users within 7 days of specific code, for your reference, the specific content is as follows (1) Landing page: login.jsp <%@ page language=”java” contentType=”text/html; charset=utf-8″ pageEncoding=”utf-8″%> <!DOCTYPE html> <html> <head> <meta charset=”utf-8″> <title>Insert title here</title> </head> <body> <form action=”LoginServlet” method=”post”> User name: < input type […]

  • Analysis of JSP data interaction implementation process

    Time:2020-8-6

    This article mainly introduces the JSP data interaction implementation process analysis, the article through the example code introduction is very detailed, to everybody’s study or the work has certain reference study value, needs the friend may refer to 1. JSP built-in objects: JSP built-in objects are a group of objects created by the web container […]

  • JSP realizes the function of user automatic login

    Time:2020-8-5

    Understand and master the function of cookie and realize the automatic login function of users by using cookie to achieve the effect shown in the figure below When the server judges that the user is logged in for the first time, it will automatically jump to the login interface to wait for the user to […]

  • The usage of session in JSP login

    Time:2020-8-4

    This paper describes the usage of session in JSP login. For your reference, the details are as follows: Login page <%@ page language=”java” contentType=”text/html; charset=utf-8″ pageEncoding=”utf-8″%> <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> <html> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″> <title>Insert title here</title> </head> <body> <div style=”float:left;margin-top:100px;margin-left:200px;width:400px;height:300px;background:gray;”> <form action=”IndexServlet” method=”post”> <div style=”float:left;width:400px;height:30px;background:gray;margin-top:50px”> <div style=”margin- left:70px;float […]

  • Implementation of a simple calculator based on JSP

    Time:2020-7-30

    This paper describes the method of implementing a simple calculator based on JSP. Share with you for your reference. The specific implementation method is as follows: index.jsp Copy codeThe code is as follows: <%@ page language=”java” import=”java.util.*” pageEncoding=”GB18030″%>  <%  String path = request.getContextPath();  String basePath = request.getScheme()+”://”+request.getServerName()+”:”+request.getServerPort()+path+”/”;  %>  <html>    <head>  <! — user submitted […]

  • JSP to achieve a simple user login and display the user information method

    Time:2020-7-29

    This paper describes the JSP implementation of simple user login and display the user information method. Share with you for your reference. The specific methods are as follows: login.jsp Copy codeThe code is as follows: <%@ page language=”java” import=”java.util.*” pageEncoding=”GB18030″%>  <%  String path = request.getContextPath();  String basePath = request.getScheme()+”://”+request.getServerName()+”:”+request.getServerPort()+path+”/”;  %>  <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML […]

  • Instance analysis of action using session method in JSP

    Time:2020-7-28

    This paper analyzes the session method of action in JSP. Share with you for your reference. The details are as follows: In Struts2, if you need to use session in action, you can get it in the following two ways 1. Get it through the method getsession in actioncontext class 2. Action implementation org.apache.struts2 . […]

  • Analysis of relative path of introducing external resources into JSP and CSS

    Time:2020-7-27

    Add base in JSP page, and the available relative path is as follows: Copy codeThe code is as follows: <%     String path = request.getContextPath();     String basePath = request.getScheme() + “://”             + request.getServerName() + “:” + request.getServerPort()             + path + “/”; %> Then add base to the < head > tag <base […]