The Jsp:plugin Action enables you to insert the object or EMBED element of the specific browser you want to specify the plug-ins that the browser needs to run a Java applet.
Grammar:
Type= "Bean|applet"
Code= "Classfilename"
Codebase=
Use a custom Label
Although you can embed Java code in a JSP page and execute it on the server side, the JSP also supports the use of custom tags to insert dynamic content, and it has a mechanism for inserting your own HTML-like tags into your JSP
First, the preface
The JDK (Java Development Kit) is the foundation of all Java applications, so you can say that all Java applications are built on this. It is a set of APIs, or some Java Class. The latest version, now officially released, is JDK1.
Package coreservlets;
Import java.io.*;
Import javax.servlet.*;
Import javax.servlet.http.*;
Import java.util.*;
/** creates a table showing the current value of each
* of the standard CGI variables.
*
* Taken from Core Servlets and JavaServer
This article illustrates the method of Jsp+ajax to upload files without refreshing. Share to everyone for your reference, specific as follows:
List page: selectaddress.jspJS Page: Ajax_edit.jsJSP processing page: editaddress.jspUpload Tool class:
Package coreservlets;
Import java.io.*;
Import javax.servlet.*;
Import javax.servlet.http.*;
Import java.util.*;
/** creates a table showing the current value of each
* of the standard CGI variables.
*
* Taken from Core Servlets and JavaServer
-Data pagination Display-JDBC 2.0:ODBC
Through the JDBC:ODBC can realize the JSP to the database operation, in this example I wrote the connection of the database in a JavaBean, can realize to reuse
pagetest.jsp file:
Database Paging Test
Although you can put a large chunk of program code in a small instruction file, most Java program code belongs to reusable components called JavaBean. JavaBean are like ActiveX controls: They provide known functionality and are designed to be
This article illustrates the implementation method of JSP paging display. Share to everyone for your reference.
The implementation methods are as follows:
Copy Code code as follows:
"
Article Management
--
In the JSP page using the "" comment, the Java code in the note will be executed, you can view the page source code to see the implementation of the completion of the content, so that the code does not want to execute, affecting the load speed. For
Hide Annotations
Write in the JSP program, but not to the customer.
JSP syntaxExample:
Copy Code code as follows:
a Comment test
a Test of Comments
Describe
Characters marked with hidden annotations
A. JSP implied object response implementation file Download introduction
(1) The simplest way to implement a file download in JSP is to define a hyperlink to a target resource, and the user clicks the hyperlink to download the resource directly,
(1) In the login application, in order to prevent malicious login, often require the server dynamically generated authentication code and stored in the session scope, and finally returned to the image form to the client display
(2) The following
Datetag.tld file:
1.0
1.2
date
http:// com.demo.util.datejstl/tags
date
com.demo.util.jstl.JSTLUtil
value
true
true
parttern
true
true
Referencing in JSP pages:
Use in JSP pages:
First JSP
In fact, the JSP simply puts Java in the HTML page. You can change the existing HTML page extension from ". html" to ". JSP", which is the best way to create the first JSP.
We can change its extension from ". html" to ". JSP" by the
In our previous chapters, any HTML file can be transformed 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 file with a. jsp
Copy code code as follows:
Filter class
public class Econdingfilter implements Filter {
Private String charset = null;
Private ServletContext context = null;
Private String Path = "";
/**
* Store data in local file before
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