When I was a beginner in JSP, I was dizzy with the value transfer problem. After I checked some information, I finally got quite open. It turned out to be so simple.
To sum up, in. JSP click to open a new window B. JSP, and pass the value of a
Now, you can indicate Server The verification method used. "Amazing," you said. "unless I can specify a URL to be protected, it will be of little use ." Yes. It is the purpose of the security-constriaint element to identify these URLs and indicate
If you want to test your JSP Application
Program Performance, then you can use jmeter, which is open by the Apache Software Foundation.
Source code . Jmeter allows you to develop test solutions to test accessible HTTP, FTP, and JDBC database
Project Environment:
From traditional operating systems to simplified operating systems. The tiles layout definition file contains dynamic files and static files.
Problem:
In the simplified operating system, the static file is displayed normally
Document directory
1. filter class:
2. Web. xml file:
Solution:
Set a filter in the background to filter and convert the encoding!
The procedure is as follows:
1. filter class:
Public class loggerfilter implements filter {Private string
/*Drop table imagetable;Create Table imagetable(NID int not null,Image blob,Primary Key (NID))Type = InnoDB;
*/
/*// ========================= 1. Write the file to the large field of the database and begin in ============ ==============Class.
When I first learned JSP, I encountered this problem. I didn't package classes when I was writing beans, that is, I didn't use the package statement. Bean compilation was correct, put the compiled class file under the WEB-INF/classes directory, then
Several methods to prevent users from directly accessing JSP pages:
1. Put the JSP page under the WEB-INF directory, store everything in this directory or its subdirectory is protected.
However, it is not recommended because not all containers have
Several Methods for passing JSP page values:1. Hide the field transfer value:">
2. url transfer value:Use buttonA. '"Value = "Modify distributor"/>B. Set the onclick = "modifyregion ()" of input ()"Function modifyregion (){Window. Self. Location =
Dynamic include
Usage:
Note: It always checks the changes in the contained files. It is suitable for inclusion of dynamic pages and can contain parameters. It can be compiled before processing.
Cause: 1. The static include result is to introduce
Test. javapackage test; import Java. util. date; import Java. text. simpledateformat; public class test {date d = new date (); Public test () {// super (); system. out. println ("in constructor"); // todo auto-generated constructor stub} Public
Introduction to JSP sessions
Abstract: Although the session mechanism has been adopted in Web applications for a long time, many people still do not know the nature of the session mechanism, and even cannot correctly apply this
This is the test file I used to connect to MySQL. It is for reference only;
dbjsp. jsp // Start with tryTry{Connection con;Statement stmt;Resultset RS;// Load the driver. The following code loads the MySQL driver.Class. forname ("com. MySQL. JDBC.
List = (list ) session. getattribute ("list"); If (list = NULL | list. size () = 0) {list = new arraylist (); random r = new random (); For (INT I = 0; I my JSP 'pager. JSP 'starting page NO. content homepage |
During web development, we often encounter functional requirements for information modification. In this case, we provide a JSP page for users to display the current information and allow users to reset new values. On this page, the drop-down list
It's okay to write a small probe to play, because it can only be embedded in the blog and so on, so this is just to get the user information, and I will write a powerful probe later.
The Code is as follows:
self-developed JSP probe mini edition:
Application:An instance of javax. servlet. servletcontext. This instance represents the web application to which the JSP belongs and can be used for JSP pages or information exchange between servlets. Common methods include:Getattribute (string
1. Request object
The request information of the client is encapsulated in the request object, so that the client can understand the customer's requirements and then respond. It is an instance of the httpservletrequest class.
Serial number method
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