1 Overview
This document is about JSP development guidance documentation. Includes: basic concepts, layout tags, code examples, FAQs, and so on.
This document is suitable for all Java developers. 2 basic knowledge 2.1 Introduction
should
Common-fileupload componentsDownload Address: http://jakarta.apache.org/commons/fileupload/Unzip the zip package after downloading and copy Commons-fileupload-1.0.jar to Tomcat's webapps/your webapp/web-inf/lib/.Create a servletImport
One of the JSP contents appears as follows, and in eclipse, the JSP problem as shown in the title Javax.servlet.jsp.PageContext cannot is resolved to a type:
Solution: Replace .
The article is transferred from Zzwell space
The session is a global variable and is the proxy of the browser thread on the server side. As soon as the Web service program is open, the session will exist, and when you first visit, the session will automatically assign you one session ID, so
Problem:In the Struts2 failed, not only turn the past also reported 404 errors. I do not know if it is not supported in STRUTS2 or requires additional configuration.
Reason: Because Struts2 uses the filter the way processing request, the default
Error Description:After using the tag in the JSP page, struts will do a series of validation in the process of submitting.
The result is that the date in the text box and the corresponding Java.util.Date type in the form will be quoted argument
Java class used, in addition to the above several, there are several left.
Two filter classes, one for filtering characters, and one for filtering users who are not logged in.
The type of button in JSP has submit, button,reset three kinds.
The button is a normal button and can have its response event.
Reset from the literal can be seen is the meaning of reset, click on the contents of the form to empty.
The submit
1. Description of the problem
The same account allows only one person to log in, when there are other users log in, give the original login user warning prompts.
2. Analytical design
The original problem is broken down into 2 small problems: A. only
Method-Set the Get and set methods directly on the action, and then use the iterator iteration output in the JSP page, but be sure to pay attention to the format. This is the format that I've been doing all afternoon.
/ Use tags ${id.name}//use El
Try to generate Excel directly from the Web page, although not directly from SQL to Excel, but more convenient and humane.
The internet has found a lot of information, found a piece of JavaScript function to implement code, very good:var eltable =
1.web Project garbled problemWhen doing Web projects, there will be more or less the problem of Chinese garbled.For JSP page form submission, controller received garbled, save to database Chinese garbled and other problems, unified to give a few
Originally intended to continue to write thymeleaf aspects of the content, a look at the content of a lot of, maybe a week can not finish, and from the controller to get value and other content can also be from the online Baidu, so wrote the
"ErrorPage specifies what the actual response page of the current page error is, where"/"represents the root of the current web App "When responding to error.jsp, the JSP engine uses the way the request is forwardedISERRORPAGE Specifies whether the
Scenario one, the interceptor adds no filtering for static resources (involving Spring-mvc.xml) Scenario two, using the default static resource handling servlet to handle static resources (involving Spring-mvc.xml, Web. xml)To enable
Javaweb:jsp Technology Quick Start Introduction
JSP full name Java Server pages, is a Dynamic Web development technology . It uses JSP tags to insert Java code into the HTML Web page. labels usually end with .
JSP is a Java servlet
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