This example is a reference to some of the Web site on JSP on the operation of XML related documents, but also combined with some personal experience. Examples of the content is the development of an enterprise internal catering system backend
1. tomcat6.0 under the JSP Getoutputstream () has already been called for the cause of this response exception and resolution
In the JSP under the tomcat6.0 this error is generally used in the JSP output stream (such as output image verification
The source of the demand is this: Upload a large Excel file to the server, the server will parse this Excel, and then a piece of the insert into the database, the whole process will take a long time, so when users click Upload, you need to display a
Today, every developer using Servlets knows JSP, a web technology that Sun invented and spent a lot of effort to implement and build on the servlet technology. JSP removes the HTML code from the servlet to speed Web application development and page
Java to determine whether input is a digital-jsp tutorial introductory Tutorial
public class Chartest {
Public Chartest () {
}
public static void Main (String args[]) {
String s = "123ABC";
for (int i=0;ichar ch = s.charat (i);
Method One: The simplest is the most used method
<%@ page language="java" pageEncoding="GBK" %>
or
This method is used for Chinese display in JSP pages.
Method Two: Use the filter
Filters are used primarily for form submissions, and data is
Many JSP beginners in learning simple JSP programming, often stay in the JSP inside the SQL statement to tune a JavaBean database connection stage, stalled.
This simple tutorial is expected to help beginners learn to use OOP ideas for JSP
Xi. Common APIs for ServletContext classes:
1.getContext (String Uripath): Returns the ServletContext object represented by Uripath in the server
2.getInitParameter (String name): Returns the value of the name parameter in the ServletConfig object
3.
js| Tutorial JSP Actions use you can dynamically insert a file, reuse the JavaBeans component, advance to another page, or generate an HTML for the Java plug-in. The action you can use is:
(1) Jsp:include--Included in a file when the page is
js| Tutorial
//----------------------------------------------------------------------------------------------
Internal objects
Out (various data types are exported to the client)
Important Method:
Out.print (type) or Out.println (type): NewLine
javascript|js| Navigation
Turn from:http://java.mblogger.cn/zhipingch/posts/15336.aspxSimilar to the MSDN CSDN navigation tree effect, JSP + JavaScript implementation!
New Document Java.lang.Class.forName
One, form part (index.html)The first is a form Fill page, with a div with ID autosavemsg to display the return information, and a checkbox with an ID of draft_autosave to determine whether to save automatically, and then name the textarea ID as
js| Programming | Question 1. For objects of type string using the println () method, if the object is null, it will print null instead of raising the nullpointerexception, the problem that is referenced is an illusion, and the subsequent
js| Data | database | database connection
A database connection is the most important part of a dynamic web site, and the technology for connecting to the database in Java is JDBC (Java Database Connectivity). Many database systems have JDBC drivers,
1.File class
The object of the file class is used primarily to get some information about the file itself.
There are 3 construction methods for creating a File object:
File (String filename);
File (String directorypath,string filename);
File
Use servlet to convert JSP file contents to HTML. The code is as follows:
Package examples;Import Java.io.ByteArrayOutputStream;Import Java.io.FileOutputStream;Import java.io.IOException;Import Java.io.OutputStreamWriter;Import Java.io.PrintWriter;
How can I allow the servlet to access the webpage or jsp file under web-inf. in web-inf, the application server regards it as a forbidden Directory, that is, it cannot be accessed directly in the browser.For some reasons, servlet access is allowed,
Environment mysql + tomcat: create the following table in mysql and insert the image.The mysql. SQL file is as follows:Create table photo (Photo_no int (6) unsigned not null auto_increment,Image blob,Primary key ('photo _ no ')) place show. jsp in
The redirection technology of JSP/Servlet is summarized as follows:1. RequestDispatcher. forward ()Is used on the server. When forward () is used, the Servlet engine transmits the HTTP request from the current Servlet or JSP to another Servlet, JSP
1. To develop a custom behavior, you need to use a series of classes and interfaces called tag extension mechanisms in JSP1.1 specifications ). All interfaces and classes required to implement the tag handler are defined in the javax. servlet. jsp.
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