Servlet technology and JSP technology are two main technologies used to develop Web applications using Java language. In 1996, Sun released Servlet technology for the first time to solve the performance problems in Web applications. When the Servlet
1. The request parameters on the request page need to be transcoded using encodeURI, and Character Set conversion is required on the page receiving the request. The character set of the request and receive page in this example are both UTF-8: 1. the
1. inherit the AbstractInterceptor class or implement the interceptor interface. Because AbstractInterceptor is the implementation class of interceptor, the general methods in the interface are implemented, but they are used to inherit
[Html] --> /Namespace. jsp /Namespace. jsp www.2cto.com description: the package is equivalent to the java package, struts. multiple packages with different names can exist in xml. [html] extends is equivalent to the inheritance
For historical reasons, this is a small example of SSH integration left over last month. This section describes Spring configurations for each layer, Struts configurations, and several pages. Spring-common.xml, mainly configure transactions: [html]
Gradually, you have learned three basic frameworks, but each of them seems to have a disruptive experience. The question is, how should we use these three frameworks? The answer is of course used together. Next, let's talk about the organic
A: ----- hyperlink, similar to in html ----- execute an action in a view. ----- if the errors of an action has a value, it is displayed. ----- if the message of an action has a value, it is displayed. ----- add a value to the list, similar to
Struts1 is undoubtedly a classic MVC framework. It has the concepts of front-end controllers and business controllers in Struts. So what is the nature of these two controllers? Let me walk you into its world step by step.
Duties of the front-end
// Note: Chinese file names such as "target page. jsp" are not recommended.
1. response jump:
// Jump with session and without request (client jump)Responst. sendRedirect ("target page. jsp ");
2. forward jump:// Jump with session and request
JSP custom tag. The part between the start and end tags of a custom tag is the Body ).
Tag handler class: defines the behavior of a tag and calls and executes it when the JSP Engine encounters a custom tag.
Tag library Descriptor (TLD) file:
DispachAction is a dynamic specified Action. That is to say, different request and url parameters at the view layer are intercepted by ActionServlet,
And in the struts-config.xml according to the request to get different parameters to specify (CALL)
, Configure the Action wildcard (wildcard)
Use wildcards to minimize the configuration quantity. However, you must abide by the principle that "conventions are better than configurations ".
1. wildcard characters
Asterisk (*) indicates all
{Number}
The yellow question mark on the jsp page indicates that our html tag does not comply with the specification.
For pages that many people get from the page artist, sometimes many pages have yellow question marks.
Why?
Multiple annotations
The Sales class of the vo package: package com. vo; public class Sales {public String salestime; public float salesnum; public String getSalestime () {return salestime;} public void setSalestime (String salestime) {this. salestime = salestime;}
When submitting a form, we often need to verify and verify the content of the form. If it is not empty, it can be submitted. If there is a blank text box, It is not submitted and the mouse focus is obtained to the text box, therefore, we can use the
Initial solution of JSP web page Programming
JSP is one of the most important parts in today's Web development. It is a part of the direct and customer interface. JSP is especially important for commercial software.
1. Introduction to JSP
JSP is
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