Notes for 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.

Implementation of jsp refreshing File Upload

I wanted to use ajax (static dynamic website) to upload a non-refreshing file. Later I found it difficult to implement it. After searching for it online for a long time, I finally found a "pseudo ajax (static dynamic website) "implementation method,

Jsp to obtain the browser and operating system information of the Client

String agent = request. getheader ("user-agent ");Stringtokenizer st = new stringtokenizer (agent ,";");St. nexttoken ();// Obtain the user's browser nameString userbrowser = st. nexttoken ();// Obtain the user's OS nameString useros = st. nexttoken

Jsp embedded webpage content-iframe

ZZzzz ~ May wind Src: file path, which can be either an HTML file or a text file or an ASP file;Width and height: the width and height of the "picture-in-picture" area;Scrolling: when the specified HTML file of SRC is not displayed in the specified

Access the Access database (JSP + Tomcat 5.5.20)

The following example shows how to access a student information table: First, create the access database file student. mdb, open the Table Designer, enter the field name and data type, and set the primary key: Second, establish test data:

JSP file upload is easy to implement

Nowadays, jsp (the preferred choice for SUN enterprise-level applications) has been applied by more and more people to the Development of background programs and the production of dynamic web pages, today, we will introduce how to use jsp (the

Seven Tips for accelerating response to JSP pages

Method 1: cache data in the servlet init () methodAfter the application server initializes the servlet instance and provides services for client requests, it will call the init () method of the servlet. In the lifecycle of a servlet, The init ()

JSP expressions, scripts, and declarations

JSP script ElementJSP script elements can be used to embed Java code into JSP pages. These Java code will appear in the Servlet generated by the current JSP page, so that JSP can separate static content from dynamic content. Script elements include:1

JSP development and use of custom tags

tld

Step description:1. Development label implementation class.HelloTag_Interface.java file content:Import javax. servlet. jsp. tagext. Tag;Import javax. servlet. jsp. PageContext;Import javax. servlet. jsp. JspException;Import java. io .*;Import javax.

Use JSP to implement Auth in Web pages

The Code is as follows: New Document If (request. getHeader ("Authorization") = null ){Response. setStatus (401 );Response. setHeader ("WWW-authenticate", "Basic realm =" www.maxcard.com "");} Else { // Obtain the input informationString encoded =

Source code generated by JSP

Java. awt. image. *, java. util. *, javax. imageio. * "%>// Create an image in memoryInt width = 60, height = 20;BufferedImage image = new BufferedImage (width, height,BufferedImage. TYPE_INT_RGB );// Obtain the image ContextGraphics g = image.

Full introduction to jspSmartUpload upload and download (IV. File Download)

Iv. File Download 1、download link page download.html The page source code is as follows: download click to download 2. Download and processing page do_download.jsp (preferred for SUN Enterprise

Install JSP in win2000

Install jsp in win2000 (preferred for SUN Enterprise applications) First go to www.sun.com to download j2sdk1.4.7. We will install java in the C: j2sdk directory. Wait... Now the java sdk is installed. Right-click my computer and choose "properties">

Implement calendar on JSP web pages

Implement calendar on jsp (preferred for SUN Enterprise Applications) web pages Jsp (preferred for SUN Enterprise applications) and calendar calendar /* Declare the variable */String [] months = {"January", "February", "March", "l", "May", "June ","

Multi-thread synchronization in Servlet and JSP

Compared with ASP and PHP, Servlet/jsp (preferred for SUN enterprise-level applications) has a high execution efficiency due to its multi-threaded operation. Servlet/jsp (preferred for SUN Enterprise Applications) is executed in multi-threaded mode

Jsp Connection database oracle

Create table test (test1 varchar (20), test2 varchar (20)Write a test record to the table.Now let's start our jsp (first choice for SUN Enterprise applications) and database journey.TestOracle (large website database platform). jsp (preferred for

A new programming idea (below): With Automatic paging 2-1 ntPage. jsp

NtPage. jsp (preferred for SUN Enterprise applications) ------------------------------------------------------------------- Int PAGESIZE = 10;Int old_PAGESIZE = PAGESIZE;Int curPage = 1;Int pageCount = 0;Int iStart = 0;Int iCount = 0;Int

JSP Example for dynamic Drawing Output

Import = "java. awt. *, java. awt. image. *, com.sun.image.codec.jpeg. *, java. util .*"%>Out. clear ();Response. setContentType ("image/jpeg ");Response. addHeader ("pragma", "NO-cache ");Response. addHeader ("Cache-Control", "no-cache ");Response.

JSP Study Notes (1) ----- Overview

1. jsp (preferred for SUN Enterprise Applications) is short for Java Server Pages. 2. Web applications developed using jsp (the preferred choice for SUN Enterprise Applications) are cross-platform. 3. jsp (preferred for SUN Enterprise Applications)

JSP built-in object (1)

Today I learnedJsp (preferred for SUN Enterprise applications). What is an object?In object-oriented programming, an object is a variable composed of operations and data as a complete object. Objects are based on specific models. In objects,

Total Pages: 1800 1 .... 1326 1327 1328 1329 1330 .... 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.