1 window. Pen ()
Advantage: simple.
Method:
(1)
2 content-Disposition
Advantages:
Content-disposition is an extension of the mime protocol. The mime protocol instructs the mime user agent how to display additional files. When
// Note: Chinese file names such as "target page. jsp" are not recommended.// Jump with session, without requestResponse.Sendredirect("Target page. jsp ");// Jump with session and request// You need to add the parameter request. setattribute ("myvar"
Do you want to create an email sending and receiving tool in JSP? The following describes how to create an email sending and receiving tool in JSP. In this article, you will learn some key points of the javamail API and how to use it in JSP. This
Part 1 installation in the Java environment
1. The latest j2sdk version is 1.4.2 _ 01,: http://java.sun.com/j2se/1.4.2/download.htmlDownload netbeans ide v 3.5.1 with j2se v 1.4.2 cobundleUse netbeans ide v 3.5.1 that includes j2se v 1.4.2
2.
/** This is the class used to manage user information.
Onlineuser. Java*/
Import javax. servlet. http .*;Import javax. servlet .*;Import java. util .*;
Public class onlineuser implements httpsessionbindinglistener {Public onlineuser (){}
Private
Here is an example:
Runtime runtime = runtime. getruntime ();
Process = NULL;
String line = NULL;
Inputstream is = NULL;
Inputstreamreader ISR = NULL;
Bufferedreader BR = NULL;
String IP = "add the IP address you want to ping here ";
//
Javabean is a Java-based software component. JSP provides comprehensive support for the integration of JavaBean components in Web applications. This support not only shortens the development time (you can directly use tested and trusted existing
Sometimes, we have a lot of repeated code in the script code on multiple JSP pages, so we will think about how to reuse them. When using it, we need to pay attention to several issues:For example, there are two files: toolbar. js and Main.
First, import the jquery package file.Download.
Then introduce the package in JSP:
Next, introduce your own JS:
The content of my. js file is as follows:
$ (Document ). ready (function () { $ (" Hello "). appendto ("body"); $ ("# Stop" )
Currently, WebLogic 9.2 is used.
Every time the JSP file is changed, WebLogic needs to be restarted, and the server is always restarted, making everyone very hurt.
Finally, we found a solution.
Take my current environment as an example:
OS:
This format control and editing works with FCKeditor, Which is perfect. The use of FCKeditor is briefly introduced in other blog posts.
When reading data from textarea and then reading data from the database, the simplest way to display the data to
1. Forward request jump
Request. getrequestdispather (""). forword (request, response );
Features:
(1) the address bar remains unchanged. Cause: Because the address bar remains unchanged after the jump, the address before the jump is refreshed,
Package bean;
Public class page {Private int totalpage; // the total number of pages.Private int currentpage; // the current page number.Private int totalrecord; // The total number of recordsPrivate int currentrecord; // number of current
// Sometimes the user wants to download the file, but the file type is associated with the browser in the system, and the result is opened in IE.
// Common examples include Word, Excel, and PDF. Therefore, converting a file into a data stream allows
I. Several Action elements of JSP: Three (custom tags embedded in JSP for the server) 1. jsp: include: Implement Dynamic include attribute: page. the URL of the target component. Starting with "/", it indicates the absolute path. 2. jsp: forward:
Compared with ASP and PHP, Servlet/jsp has a high execution efficiency due to its multi-threaded operation. Servlet/JSP is executed in multi-thread mode by default. Therefore, you must carefully consider the multi-thread synchronization issue when
implementation methods
Generally, two types of tags are used: the body part and the body part.
-- To implement tags without the body part, you must inherit the tagsupport class and implement the dostarttag () and doendtag () methods.
-- To customize
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