Dbnetlist is a comprehensive list selection component that acts as a dynamic HTML (DHTML) implementation. With Dbnetlist, you can quickly add database-driven lists, drop-down lists (Drop-down), tree types, and check box lists to your Web pages.
1: Install the mysql database on the data server. This is required. On your own ssh or virtual machine, you can see related prompts on data mysql, indicating that the installation is successful:
2: I am using a tomcat server. Here, I need to
1. request. getRequestDispatcher () is request forwarding, and a request is shared between the front and back pages;Response. sendRedirect () is a redirection, and the front and back pages are not a request.
2. RequestDispatcher. forward () is run
There are two small exceptions when the original data is transmitted to the client:
1. If you want to transfer , because it is consistent with the special symbols of jsp, you must use escape characters, 2. If you want to send comments, they will
Example 1:Simple jsp custom tag to get content:Create a jsp instance class and inherit the SimpleTagSupport class.Then implement the doTag () method of the parent classGet the content of this. getJspBody () in the label body in this method ();The
I. javaBean1. what is JavaBeanJavaBean is a Java class that follows a specific writing method. It generally has the following features:> this Java class must have a no-argument constructor> the property must be privatized> the private property must
Receiving Request Parameters1:Http: // MAID: 8080/struct2341/test/helloworld. do? Id = 123In this way, the action class will get the id name matching through the reflection mechanism; you can also use the form to submitPublic class HelloWorldAction {
1 because struct2 functions such as file upload and data verification are all set by the system's defaultThe interceptor in defalutStack is implemented, so we define that the interceptor must reference the default defalutStackIn this way, other
ModelDrivenInterceptor: the interceptor is in the ninth position of ultultstack. To make the interceptor valid after ScopedModelDrivenInterceptor, the Action must implement the ModelDriven interface, which is a method: getModel (), the main task of
The ultworkflowinterceptor interceptor is at the position of defaultStack 18th. It is the last interceptor in the defastack stack interceptor stack. Its main function is to determine whether the execution process of the current Action is incorrect,
Summary: The Interceptor is a very important component of struts2 and an extremely subtle part of struts2. Many functions of struts2 are implemented through these interceptors, such as exception handling, file Upload request parameter assignment,
Working principle of Struts1
1. Initialization: The overall controller ActionServlet of the struts framework is a Servlet, which is stored on the web. configured in xml to automatically start the Servlet, at startup the Controller will read the
There are several methods for jsp to obtain the session value from the action:For example, there is a session ("sessionid", "sessionValue") in my action ")1. Use the struts tag to obtain: Ii. session is also one of the built-in objects and can be
Let's not talk much about it. Let's look at the example above.InsertCopy codeThe Code is as follows:String SQL = "insert into allorder values ('" + orderid + "', '" + bookid + "', '" + amount + "', '"+ username + "')";Int result=stmt.exe cuteUpdate (
Generally, the following two packages must be referenced to develop jsp custom tags:
ImportJavax. servlet. jsp .*;
ImportJavax. servlet. jsp. tagext .*;
First, we need to get a general idea of the interface and class hierarchy involved in the
(1) Install Tomcat7 in Ubuntu:
It is very easy to install tomcat7 in ubuntu. Just refer to [1],
(1) type the command:
Sudo apt-get install tomcat7,
(2) check the website http: // localhost: 8080/
In my version it is showed like this:
(2) If
Repeated form submission is one of the most common and troublesome issues in multi-user Web applications. There are many application scenarios that will encounter repeated submission issues, such:Click Submit twice.Click Refresh.Use the browser back
The JSTL tag is used today.
When redirecting a tag, I encountered a very bad problem, that is, when I test the tag, I want to test other content, because it is redirected (the browser address will change), it will certainly affect my subsequent
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