Java Server Page (JSP) is becoming increasingly popular as a technology for creating dynamic web pages. JSP is not the same as ASP, PHP, and working mechanism. Generally, JSP pages are compiled rather than interpreted during execution. Calling the
I. Environment Configuration
First, add the driver to classpath.
1. storage location of the driver when connecting to MySQL:Driver name: mysql-connector-java-3.1.5-gamma-bin.jarPath: tomcat5.5/common/libIt takes effect after you restart tomcat.
The basic component JSP has the following nine basic built-in components (which can correspond to the six internal components of ASP ):Request: User-side request. This request contains the parameter string 4 from the get/POST request.
Response:
8) labels:Forward a request object. You can pass parameters. The target file must be able to process parameters.Before use, the JSP file has data, so the File Execution will fail.Attribute:-Page = "URL or expression" indicates the URL of the file to
Have you ever thought aboutJSP page(Or servlet) to send dynamically generated images? This tip tells you how to do it. To run the code here, you need a tomcat or other web server that supports JSP 1.1.
When a Web page is sent with the MIME type of
Static JSP inclusion
Now let's take a look at the JSP static include command:
Create a project testinclude
Then add the file:
Index. jsp:
this is user's area
Curdate: (without a suffix)
curDate:
Curdate. jsp:
When learning JSP, sometimes the Page forms are submitted with garbled characters
Make the following changes to see if there will be garbled characters:
(I am using a UTF-8 code // gb2312)
1. Modify the workspace encoding in myeclipse
Preferences -
Preface
In JSP web projects, the file upload function is likely to be used.
Upload a local file to a path on the Web server.
For Java, there are many open-source components that implement such functions, such as commons-fileupload, and so on
Ckeditor api chm help document http://download.csdn.net/detail/guoquanyou/3622884
The JSP page uses the Rich Text control ckeditor to submit form data
Use the Rich Text control ckeditor to customize the style on the JSP page
JSP uses ckeditor and
To build the ckeditor environment, see the ckeditor3.6 getting started tutorial in JSP.The JSP page uses the Rich Text control ckeditor to submit form data
Use the Rich Text control ckeditor to customize the style on the JSP page
JSP uses ckeditor
1. Understand the web design process and working principle, and analyze the running process of the program according to the workflow.
2. Understand the MVC design mode. Learn some design patterns to better grasp the overall structure of the project.
The teacher asked me to build a small personal financial management system and use the jsp I learned this semester. Because the project is relatively small, I use JSP + JavaBean.
The previous analysis was successful, and there was a problem at the
I. Core tag libraries mainly include general tags, condition tags, iteration tags, and URL-related tags.Add the code at the beginning of the JSP file using the core tag Library:
II. General Purpose labels, such as , , , and
1. The label is used
Jquery. Treeview. js
1. Tree Structure
$ {Name}$ {Name}$ {name}
2. Add slices to the Tree Structure
$ {name}
3. Enable the check box to have the same effect as the single-host text
$ {name}
Note that the tag can be nested with Struts
Request indicates the httpservletrequest object. It contains information about browser requests and provides several useful methods for obtaining cookie, header, and session data.Response indicates the httpservletresponse object, and provides
Color getrandcolor (int fc, int BC)... {// obtain the random color in the specified range.
Random random = new random ();
If (FC> 255) fc = 255;
If (BC> 255) BC = 255;
Int r = FC + random. nextint (BC-Fc );
Int G = FC + random. nextint (BC-Fc );
Int
1. Modify the file editor ewebeditor used to add news content
2. Store the file name and title in the database to facilitate the foreground to call these generated static news pages.
1. An error occurred while displaying the image after
(Unlike generating static html from JSP, all the news is static.
If the HTM template is used, it will be replaced in different places.
)
Similar;
Request. setcharacterencoding ("UTF-8 ");String title = request. getparameter ("newstitle ");String
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.