Some time ago to see some of the application of taglib, feeling very mysterious, just at the beginning of the time still do not understand what the role of Taglib, in the library several times to find out, finally understand, today to learn the
introduction of Built-in objects
Built-in objects cannot be in .
Built-in objects
Owning class
PageContext
Javax.servlet.jsp.PageContext
Request
Javax.servlet.http.HttpServletRequest
used to locate or sample a JavaBeans component. will first attempt to locate a bean instance, and if the bean does not exist, then will sample from a class or template. In order to locate or sample a bean,, the following steps are gathered, in
Recently has been studying fckeditor editors, online to find some information.
One, File download
1): Fckeditor_2.6.4.zip (main file package, contains the main style CSS, templates, js file)Address:
Example description: Through a form submission page submitted to Servlet,servlet to obtain information, after processing, the information into the request object, if the user submits the name is empty, will return to the home page, otherwise, the
Attach GitHub address with Script circle part of the area, used to store the template Note 1, to have ID 2, type is text/html 3, {{Each list as value I}} Circle traversal range 4, {{value.xxx}}} to take value
Call Method: Template ("id",
At first I thought it was my SQL statement has a problem, after many experiments, in the Navicat test can pass, indicating that the SQL is not a problem.
Later the interrupt point found that the value returned is a JSP page error.
The
Principle:
Servlet page Code:
1. Each request produces a token (generally timestamp), stored in the session and followed by hidden submission, in the servlet to determine whether the received token and session consistency to determine whether to
First, what is JSP JSP (JavaServer Pages) is initiated by the Sun Microsystems Company, a number of companies involved in the establishment of a dynamic Web page technology standards, its Web site for the http://www.javasoft.com/products/jsp. Adding
The C tag we use in web development is the core library in Jstl, providing common support for everyday tasks
: Setting variable values and Object properties
: Display variable contents in page
No label body:
Has the label body:
label Body
The three major scope objects of the servlet:
Request (HttpServletRequest)
Session (HttpSession):
Application (ServletContext): Tomcat was created when it was started, destroyed when Tomcat was shut down, and the entire Web lifecycle was only one
1. requestdispatcher. forward () is used on the server. When forward () is used, the servlet engine transmits the HTTP request from the current servlet or JSP to another servlet, JSP, or common HTML file, that is, your form is submitted to. JSP, in.
1. requestdispatcher. Forward ()
Is used on the server. When forward () is used, the servlet engine transmits the HTTP request from the current servlet or JSP to another servlet, JSP or common HTML file, that is, your form is submitted to. JSP, in.
I. jsp tag system
Ii. Tag execution process:
III.Custom tags;
3.1 The main role of a custom tag is to remove the Java Script in JSP. It belongs to JSP Technology
3.2. Procedure for compiling a custom tag: (definition of a traditional tag)3.3
Step 1: Install JDK and Tomcat and configure Environment Variables
Step 2: Create your own JSP app directory1. Go to the webapps directory of the tomcat installation directory, and you can see the Tomcat built-in directories such as root, examples,
1Http://www.opensymphony.com/oscache/
2. Add the downloaded jar to your build path.. We recommend that you directly put it under the tomcat/shared/lib directory.
3. Add configuration in Web. xml
oscache /WEB-
Many netizens encountered the following problems when learning JSP programming:How to economically build a JSP websiteWhat database does the website use? I am not familiar with MySQL. I want to use SQL Server. The space of the service provider is
Date Problems
1. Get the current server Date:
[Copy to clipboard] [-]
Code:
Date mydate = new date ();
%>
2. Obtain the current year, month, and day:[Copy to clipboard] [-]
Code:
Date mydate = new date ();
Int Thisyear = mydate. getyear () + 1900; //
Request. getcontextpath () indicates/project name. Example:/news01
1. jump from the JSP page to another page or Servlet
Use the full path (/project name/file path) to jump from the JSP page to other pages ). For example, the project name is news0
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.