Category:JSP

  • Summary of JSP playing video files

    Time:2020-1-18

    The example of this paper describes the method of JSP playing video file. To share with you for your reference, as follows: 1.avi format The code snippet is as follows: JSP Code: <object width=”400″ height=”200″ border=”0″ classid=”clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA”> <param name=”ShowDisplay” value=”0″> <param name=”ShowControls” value=”1″> <param name=”AutoStart” value=”1″> <param name=”AutoRewind” value=”0″> <param name=”PlayCount” value=”0″> <param name=”Appearance value=”0 […]

  • Analysis of JSP listener usage

    Time:2020-1-17

    An example of this article describes the usage of JSP listener. To share with you for your reference, as follows: Listener, also called listener, is the listener of servlet service. It can listen to the client’s request, the server’s operation and so on. For example, count the number of online users. When an httpsession is […]

  • Analysis of the method of getting URL path by JSP

    Time:2020-1-16

    The example of this paper describes the method of getting URL path by JSP. To share with you for your reference, as follows: If the URL you requested is http://localhost: 8080/demo/index.jsp Request. Getscheme() // output: http Request. Getservername() // output: localhost Request. Getserverport() // output: 8080 Request. Getcontextpath() // output: / demo Request. Getrequestpath() // […]

  • Analysis of common query and display methods of JSP page

    Time:2020-1-15

    The example of this paper describes the common query and display methods of JSP page. To share with you for your reference, as follows: Background: 1. The database query results need to be displayed in a list in JSP2. In a good J2EE mode, database query is generally implemented by Dao (data access object), and […]

  • Summary of common skills in JSP programming

    Time:2020-1-14

    This paper summarizes the common skills of JSP programming. To share with you for your reference, as follows: 1、 Detach values in the drop-down list box There is a drop-down list box in the page, as follows: <td><select > <option value=””></option> < option value = “18-30” > 18-30 years old < / option > < […]

  • Several solutions to Chinese code disorder (recommended)

    Time:2020-1-13

    First of all, my special situation: 1. In the foreground JSP, I use the form post request, set enctype = “multipart / form data”, and the page encoding format is UTF-8 2. In the background, I use the Commons fileUpload component to parse form forms and files, 3. Set request.setcharacterencoding (“UTF-8”); 4. Set servletfileupload. Setheaderencoding […]

  • Realization of news management system with complete source code based on JSP

    Time:2020-1-12

    Great news release system to share with you, I hope you like it. Let’s talk about the JSP based news release system, which uses JavaBean, filler, database and other technologies to realize the news release function. After the release, it can delete, modify, or continue to add new articles to each news, and finally it […]

  • The solution to the problem that El expression in JSP page is treated as string and does not display value

    Time:2020-1-11

    When I practiced, I encountered the phenomenon that El expressions were treated as strings without proper parsing. Java ee5 used in the project at that time, web.xml <web-app version=”2.5″ xmlns=”http://java.sun.com/xml/ns/javaee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd” > El expression is not parsed. It is treated as a string. Later, we changed web.xml to <web-app version=”2.4″ xmlns=”http://java.sun.com/xml/ns/j2ee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee […]

  • JSP build error page and jump automatically

    Time:2020-1-10

    In various common web sites, we often find a function: when a page makes an error, it will automatically jump to a page to prompt the error information. To complete the operation of the error page, you must meet two conditions: 1. Specify the jump page when an error occurs, which is specified by the […]

  • The method of adding horizontal scroll bar to table in JSP

    Time:2020-1-9

    First of all, the bootstrap framework is used in this project, so some people will say that it’s OK to set the adaptive attribute for the table What I want to say here is Bootsrtap adaption is designed for horizontal scrollbars only when the browser is half full of the screen When we maximize the […]

  • The solution of using ${} in JSP page does not work

    Time:2020-1-8

    In the dynamic display of all resources, it is found that ${} does not work, so the page does not display the results. After exclusion, it is found that JSTL has no reference, and it is referenced in the page header <%@taglib uri=”http://java.sun.com/jsp/jstl/core”prefix=”c”%> that will do The above is the whole content of the solution […]

  • How to get the current date and time in JSP page

    Time:2020-1-7

    1、 <SCRIPT LANGUAGE=”JavaScript”> var myDate = new Date(); Mydate. Getyear(); // get the current year (2 digits) Mydate. Getfullyear(); // get the complete year (4 digits, 1970 -????) Mydate. Getmonth(); // get the current month (0-11,0 represents January) Mydate. Getdate(); // get the current date (1-31) Mydate. Getday(); // get the current week x (0-6,0 […]