Chinese processing is very troublesome during development. Some content is recorded as follows:
JSP file encoding: UTF-8Tomcat URI encoding: UTF-8
1. Get form data.
String atest = request. getparameter ("test ");If (Atest! = NULL &&! Atest.
The JavaBean specification introduces the concept of "software components" into the Java programming field. Javabean is a software component model that describes java. Its main purpose is to achieveCode.
Javabean is a Java class. Compared with a
Some time ago I thought about how to learn things by myself. It was like a dog, a bear, and a corn. I learned one, lost one, But I still wrote a log and saved my footprints!
201012.17 started downloading tomcat6.0 and mysql5, and developed a
Import the custom class in JSP. the user is defined under the default package, as follows:
Then,
Run:
The import user cannot be resolved
Change the user class to the class in the Custom package as follows:
Com. Test. importclass.
How can I allow the servlet to access the webpage or JSP file under Web-INF. in web-INF, the application server regards it as a forbidden directory, that is, it cannot be accessed directly in the browser.For some reasons, Servlet access is allowed,
When we use include to include JSP files, we find that there are redundant blank lines on the final generated page, and there is a character that cannot be displayed in the source code. After checking some articles, we find that the problem lies in
The JSP (Java Server Pages) introduced by Sun is a dynamic web page development technology executed on the server, which is based on Java technology. When executing JSP, you need to set up an engine for compiling JSP web pages on the web server. You
Jspinit () {}: this method is called when the JSP page is initialized, and this method is only executed once during initialization, therefore, the user performs initialization parameter configuration and other one-time work here, which is created by
If "relative path" is used in JSP, problems may occur.
Because the "relative path" in the webpage is relative to the "URL request address" to find resources.
What does the above sentence mean?For example:Assume that we have a project: MyAppUnder
JSP standard tag library -- jstl
Jstl is a set of custom tag libraries that implement common functions in Web applications.
Jstl has five categories:
1. Core tag Library
2. internationalized/formatted tag Library
3. Database tag Library
4. xml tag
JSP files are composed of two types: JSP elements and HTML templates.
HTML templates are mainly used for static Web page display. Based on HTML templates, JSP elements related to dynamic web pages are added to achieve dynamic web page
When talking about JSP program design, we should first understand the HTTP protocol.
1. Basic HTTP knowledgeHTTP is a hypertext transfer protocol and stateless protocol. It uses the default open port 80. The Browser needs to establish a connection
Basepath in JSP (this article is reprinted articles, articles reprinted from http://blog.csdn.net/lutinghuan/article/details/6450174)
The following code is automatically generated on the new JSP page of Eclipse:
String Path = request. getcontextpath
14.5 compile the JSP page of the News Publishing System
Compile Its JSP page based on the news publishing system designed above.14.5.1 show. jsp
The page is stored in the WEB-INF/JSP to display published news and display according to the news
Seven JSP actions
An action can affect the output text stream and create an object by editing.Id attribute and scope attribute attributes of each JSP action.
ID: indicates the name of an action,
Scope: indicates the scope of an action. Scope values
Modify the src attribute of an image and assign a value to it to refresh the image,
However, due to the cache issue, if both values are the same, the browser generally does not refresh the image. Therefore, you need to make no changes to the image
The simplest thing is to convert the URL Based on the URL rewriting (rewrite) module in various web servers:In this way, the program implementation will be almost unchanged? The link id = 234 is mapped to news/234.html, and looks like a static link
1. This is a game of guessing numbers. By using JSP to call JavaBean
2. Two files are required: Number. jsp and numberguessbean. java.
3. Check the number. JSP code first:
If (number. getnumguesses () = 0)
{
%>
welcome to the number guess
JBoss 4.0 is automatically integrated with Tomcat 5.0, so it is not only a professional EJB container, but also a professional JSP/servlet container and web server.
Tomcat 5.0 is integrated in the following directory of
1. Which of the following methods are generally implemented during servlet execution?A: Which of the following methods are generally implemented during servlet execution?(1) Public void Init (servletconfig config)(2) Public servletconfig
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