JSP Summary 2: Servlet

Servlet is a piece of Java code that can expand the functions of the Web server. Each Servlet is running in the process, and a new Servlet request is run in the Servlet process as a thread.The Servlet container is responsible for connecting the Web

Jstl dynamically adds drop-down list items in jsp

Before using the jsp below, you need to write an Stu class to generate the set and get methods. Public Class Stu{ private int id; private String name; public void setId(int id){ this.id=id; } public int getId(){ return

Jsp switch statement usage

If you want to execute one of several code blocks, you can use the switch statement: Syntax:Switch (n){Case 1:Execution Code Block 1BreakCase 2:Execution Code Block 2BreakDefault:If n is neither 1 nor 2, execute this code}Working principle: the (n)

Solve jsp repeated submission

There are several methods:1. Add this code to the HEAD area on your table list page:2Generate a token and save it in the user session. Add a hidden domain in the form to displayThe value of the card. After the form is submitted, a new token is

SQL Server Stored Procedure instance calling in JSP

The following is an example of a JSP calling SQL Server Stored Procedure: Create a table: Create table [BookUser] ([UserID] [int] IDENTITY (1, 1) not null,[UserName] [varchar] (50) COLLATE Chinese_PRC_CI_AS not null,[Title] [nvarchar] (50) COLLATE

Jsp Database Connection Methods

Many new jsp beginners often ask how to connect to the database. Why are there errors? Therefore, I wrote an article here for your reference. In fact, it is not a good practice to put all the database logic in jsp, but it is helpful for beginners to

Complete JSP program for user login verification

Public String validateUser (String inputUserid, String inputPwd)Throws SQLException{String returnString = null;String dbUserid = "userid"; // User Name of the databaseString dbPassword = "password"; // Database passwordClass. forName ("sun. jdbc.

Accelerate JSP database access in JDBC

JSP programs are all modules and have powerful divsentation-request functions. Establishing a perfect database access is a challenging process, and the JDBC interface can well complete this process. However, the JDBC code embedded in JSP code, like

Error page setting in jsp

1. Set errorPage: errorPage. jsp % @ PageIsErrorPage = "true" %> JSP Page Error ~! 2. Application % @ PageInfo = "Bad page" %> % @ PageErrorPage = "errorPage. jsp" %> // go JSP Page Boolean tf = true; If (tf )

Performance Optimization of JSP and Servlet

In this article, we will guide you through the proven performance Adjustment Technology, which will greatly improve the performance of your servlet and jsp pages, and thus improve the performance of J2EE. These technologies are used in the

Three implementation methods of spring dependency Injection

Before explaining the three implementation methods of dependency injection, let's clarify the meaning of dependency injection: Make the component dependent on abstraction. When the component needs to be dependent on other actual objects, inject

Several methods to improve the efficiency of JSP applications

This article introduces several very practical methods to adjust JSP and servlet, which can make your servlet and JSP page response faster and more scalable. In addition, when the number of users increases, the system load will show a smooth and

Garbled characters in jsp and servlet

In the development of jsp and servlet, a small example I made today shows Chinese garbled characters. I have used many methods and found that it still cannot be solved. Finally, I used a filter to end the process. This method is summarized as

AOP Concept Analysis

Why do we need to distinguish J2EE containers from J2EE application systems? We know that a J2EE application system can run only when deployed in a J2EE container. Why is it divided into a J2EE container and a J2EE application system? By analyzing

How to optimize database linked Resources

Problem description: To connect to the database for query on the page, the obtained results are displayed on the page. After each query, close is used to close the connection. Normally, it can be monitored in the database. After a connection is

Integration of Apache2.2 and Tomcat5.5 in JSP environment Configuration

Apache and Tomcat are two projects under the Apache Foundation. One is the http web server and the other is the servlet container. The latest 5.5.X series implements servlet 2.4/JSP 2.0 Spec. In our production environment, Apache is often used as

Several Frequently Asked Questions in Java and jsp Programming

1. when the println () method is used for objects of the String type, if the object is null, null is printed instead of NullPointerException, which may lead to the illusion of reference, subsequent operations on strings may cause problems. 2.

The path to JSP programmer Growth

A common mistake is to regard JSP as a simplified Java. It is impossible (in fact, JSP is a simplified Servlet). Programmers generally try to directly learn JSP without learning the necessary support skills. JSP is a connection technology that you

How to jump to another page in JSP

Use JSP forward Action in jsp to redirect pages. Syntax: }"/> or }"> Value = "{parameterValue | }"/>+ This action allows you to forward the request to another page. It has only one attribute, page. Page should contain a relative URL. This can be a

Total Pages: 1800 1 .... 1372 1373 1374 1375 1376 .... 1800 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.