• Using JSP to make a super simple web calculator for instance sharing


    To implement a simple calculator program, we need to use JSP + JavaBean mode.The project source code is as follows:File: calculator.jsp <%@ page language=”java” pageEncoding=”UTF-8″%> <%@ page isErrorPage=”true”%> <%@ page errorPage=”calculator.jsp” %> <%@ taglib uri=”” prefix=”c”%> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”> <html> <head> < title > simple computer < / Title > </head> […]

  • Summary of the usage of some JSTL core tags in JSP


    1、 JSTL introduction JSTL (JavaServer Pages Standard Tag Library) is a standard specified by JCP (Java community process), which provides Java Web developers with a standard and general tag function library. And El to replace the traditional method of directly embedding Java programs (scripting) on the page, in order to improve the readability, maintainability and […]

  • Summary of SQL tags in JSP


    <sql:setDataSource> Label setting data source Grammatical structure: Copy codeThe code is as follows:     <sql:setDataSource url=”jdbcUrl” driver=”driverClassName” user=”userName” password=”password” [var = “varName”][scope=”{page | request | session | application}”] /> <sql:update> Add, delete and modify Tags The first format: Copy codeThe code is as follows: <sql:update sql=”sqlUpdate” [var=”varName”] [scope=”{page|request|session|application}”][dataSource=”dataSource”] /> eg: <%@ page contentType=”text/html;charset=GBK”%> <%@ taglib […]

  • How to use JSTL FMT (format format) tags in JSP


    JSTL tags provide support for internationalization (I18N), which can display different languages according to different client regions where requests are made. It also provides methods for formatting data and dates. I18N format tags library is required to realize these functions. The methods of introducing the label library are as follows: <%@ taglib prefix=”fmt” uri=”” %>The […]

  • Using tutorial of Preparedstatement object operating database in JSP


    The Preparedstatement interface inherits statement and differs from it in two aspects:The Preparedstatement instance contains compiled SQL statements. This is to make the statement “ready.”. The SQL statement contained in the Preparedstatement object can have one or more in parameters. The value of the in parameter was not specified when the SQL statement was created. […]

  • Detailed explanation of statement object statement operation MySQL in JSP


    Statement object statement contains two main methods: executeupdate() method to perform data update operation (add record, delete record, update record), executequery() method to perform data query operation (query record) Add record <%@page language=”java” contentType=”text/html;charset=gb2312″%> <%@page import=”java.sql.*” %> <!DOCTYPE html> <html> <head> < title > add user record < / Title > </head> <body> <% String […]

  • An example explains how JSP gets the data in resultset result set


    Get all the records <%@page language=”java” contentType=”text/html;charset=gb2312″%> <%@page import=”java.sql.*” %> <!DOCTYPE html> <html> <head> < title > query records of all users < / Title > </head> <body> <% String url = “JDBC: MySQL: // localhost: 3306 / JavaWeb”; // the URL address to connect to the database String user = “root”; // user name […]

  • The tutorial of JSP program using JDBC to connect to MySQL


    Installing and loading JDBC drivers Download the JDBC driver // the file mysql-connector-java-5.1.7-bin.jar in the Lib file under the WEB-INF directory of the project, and the installation is completed (if MySQL is installed on your machine, install it first if not installed) Load in JDBC Driver <%@page language=”java” contentType=”text/html;charset=gb2312″%> <!DOCTYPE html> <html> <head> < […]

  • JSP uses ajaxfileupload.js to realize cross domain problems


    No more nonsense, just post code for you. The JSP code is as follows $.ajaxFileUpload ( { URL: ‘ 8080 / gap / gap / fileUpload. Do’, // the server-side request address for file upload (the local machine is FXB. ABC. Com) Secureuri: false, // generally set to false Fileelementid: ‘file’, // ID attribute of […]

  • JSP student information management system


    This example shares the source code of JSP student information management system, JSP + servlet + JavaBean + jdbc + MYSQL, for your reference. The specific content is as follows 1. Service layer for database operation package com.service; /** *Responsible for all database operations of student information, adding, deleting, modifying and checking */ import java.sql.Connection; […]

  • JSP realizes the function of user login, registration and exit


    This paper describes the use of JSP to achieve user login, including user login, registration and exit functions. 1. System use case diagram 2. Page flow chart 3. Database design This example uses Oracle Database Create user table Including ID, username, password and email, 4 fields in total — Create table create table P_USER ( […]

  • Analysis of the whole process of making java web login function with JSP + Servlet


    0. Create a new web project First, create a new Java Web project named login in MyEclipse. At this point, the project contains an SRC folder and a Webroot folder, as well as the JRE Library folder and J2EE Library folder that come with Java Web. The Webroot folder contains the WEB-INF folder and an […]