Category:JSP

  • JSP to implement shopping program

    Time:2022-6-10

    The following is the source program of the shopping cart I made with JSP and database: be careful:1. The re billing part has not been completed yet. Let’s do it ourselves!2. The next version will use session. //shop_cart.jsp <%@ page contentType=”text/html;charset=gb2312″%><%@ page session=”true” %><%@ page language=”java” import=”java.sql.*” %><jsp:useBean id=”bka” scope=”page” class=”shop.bka” /><% String product_type;String action;int […]

  • JSP counter making

    Time:2022-6-9

    The counter is a must for general websites. Don’t underestimate it. Whenever the webmaster looks at the rapid growth of the number on the small counter, he feels really good. In the past, we used CGI and ASP to write counters. There are many articles in this field. Here, we will use the popular JSP […]

  • Write file upload with JSP

    Time:2022-6-8

    If you have ever used VB to write components for file uploading, it is very easy to write JavaBean for file uploading in Java.The following example is only a short versionpackage yuanyifileup;import java.io.*;import java.util.*;import javax.servlet.*;import javax.servlet.http.*;import javax.servlet.jsp.PageContext; public class yuanyifileup{private ServletRequest request;private ServletResponse response;private ServletConfig config;ServletInputStream DATA;int FormSize;File f1;FileOutputStream os;DataInputStream is;String filename;byte[] b;byte t;boolean flag=false;public […]

  • Dynamic website development technology based on JSP

    Time:2022-6-7

    With the development of web technology and the arrival of e-commerce era, people are no longer satisfied with the establishment of various static information publishing websites. More often, they need dynamic websites that can interact with users and provide services such as the management and control of background databases.Dynamic website development technologyThe early dynamic website […]

  • JSP from simple to deep (3) — adding dynamic content through expressions

    Time:2022-6-6

    In our previous chapters, any HTML file can be converted into a JSP file by changing its extension to jsp。 Of course, we need to know what makes JSP useful? The answer is the ability to embed Java. Place the following text in a JSP, for example, this file is myjsp JSP, and then put […]

  • JSP from simple to deep (5) — the mixture of scriptlets and HTML

    Time:2022-6-5

    In the previous tutorial, we have used the “out” variable in a scriptlet to generate HTML output. For more complex HTML, if we still use the “out” variable, we will lose many advantages of JSP programming. In fact, we can easily mix scriptlets and HTML. Suppose you want to generate a table in HTML. Generating […]

  • JSP from simple to deep (1) — familiar with JSP server

    Time:2022-6-4

    Familiar with JSP server This “JSP from simple to deep” series of tutorials is for intermediate and advanced users. It requires the foundation of HTML and Java. You should be able to link HTML pages together and use Java for programming. If you don’t have this foundation, I suggest you lay it first. This series […]

  • JSP from simple to deep (12) — form editing

    Time:2022-6-3

    For example, the logo library from the blazix server cannot be used in your system environment, so how about not using the logo library to achieve similar functions? This tutorial is designed for this problem. This problem can be solved, but the code should be longer. Basically, you have to edit the HTML flag yourself […]

  • JSP from simple to deep (11) — tag library

    Time:2022-6-2

    JSP 1.1 proposes a method of extending JSP flags, which is named “flag library”. These libraries allow additional flags like jsp:include or jsp:forward, but they are not prefixed with jsp: and they also attach some features. To introduce the logo library, we use the blazix logo library as an example in this tutorial. This logo […]

  • JSP from simple to deep (10) — beans and forms processing

    Time:2022-6-1

    Forms is a very common way to interact in websites. JSP makes form processing easier. The standard way to process forms in JSP is to define a “bean”. This “bean” is not a complete java bean. You just need to define a class so that it has a region, which corresponds to each region in […]

  • JSP from simple to deep (9) — JSP sessions

    Time:2022-5-31

    On classic websites, visitors can browse several pages and perform some interactive behaviors. If you are writing such a website, it is very useful to use some data of each user. For this purpose, we can use “sessions” in JSP. Session is a user related object. When the user visits the website, some data is […]

  • JSP from simple to deep (8) — JSP Tags

    Time:2022-5-30

    Another important syntax for JSP is tags. JSP tags does not use <%, but only the < character. JSP tag is a bit like HTML tag. JSP tags can have a “start tag”, a “tag body” and an “end tag”. Both the start and end signs can use the name of the sign, which is […]