User is a sub-directory under the root directory of the project.
Before modification
= "/User/left. jsp"Name = "menu">= "/User/Right. jsp"Name = "right">
User/left. jsp"Name = "menu">User/Right. jsp"Name =" right ">
Powerful solutions for garbled Chinese characters when JSP pages contain HTML files!
(09:37:26)Add the following to the project's web. xml file:Code:
Special Property Group for JSP configuration html
Example.
1. Install JDK and eclipse in a Java environment
2. install Apache-Tomcat-6.0.26
3 install mysql-5.0.22-win32 and a graphical interface mysql-gui-tools-5.0-r17-win32
3 install myeclipse-8.0.0-win32
You can also set myclipse, add the JDK path,
I used to think that my website was not very good, but after I got in touch with JSP, I changed my mind. Now I decided to do a good job in the direction of Java, Because Java has a JVM virtual machine, so I developedProgramIt can be used across
Servlet to obtain the absolute path of the project string filepath = This. getservletconfig (). getservletcontext (). getrealpath ("/"); absolute path of the root directory: request. getservletpath (); absolute path of the file: request.
Reading this article
Article Before that, please read the Illustration using eclipse3 + sysdeo Tomcat plugin to edit and debug JSP, which can deepen your understanding of this article. If you have other questions, refer to my blog-share Java.
This article
Article This article describes how to use lomboz to develop jstl and El. It is best to first refer to my previous article "using eclipse3.0.1 + lomboz3.0.1 + atat5.0.28 to develop jsp". The environment configuration is similar to it.
. The presentation layer of JSP/jsp bean should be as thin and simplified as possible.. Remember that most JSP pages should be read-only views, and the page bean provides the model.. JSP and JSP bean should be designed together. Remove the business
Package com. longweir;// An After paginationImport java. SQL .*;Import com. longweir. util .*;Public class pagebean {Private int pagesize = 5; // The number of records displayed per page is 5Private int currentpage = 1; // current page numberPrivate
Use servlet to control sessions
Session status maintenance is a problem that must be faced when developing Web applications. There are multiple ways to solve this problem, such as using cookies and hidden form fields, or directly add the status
I found an example for the upload task and kept it for reference.
Upload: The smartupload component is required.
Import COM. jspsmart. upload. *; Import javax. servlet. *; Import javax. servlet. HTTP. *; Import Java. io. *; Import Java. util.
1. During program development, we often encounter Chinese garbled characters:
1. garbled characters are sent from the page to the background. What should I do?
You can add the following code before accepting the page value transfer:
Request.
I. Overview of JSP built-in objects
Definition:Member variables that can be used in JSP page scripts (Java program fragments and Java expressions) without declaration. In JSP technology, several internal JSP objects have been defined. Applying these
Tomcat webapps to create a directory validate, build a WEB-INF Directory, which creates a web. xml file, the Code does not need to be written, there is a statement on the line: Web. xml:
Xmlns = "http://java.sun.com/xml/ns/j2ee"
Xmlns: xsi = "http:/
Because Ajax brings us too many benefits, we will give priority to this technology in many applications, so I am also attracted to it. I will share with you the next simple example.Regist. jsp file: a simple registration page
%> registration page
This article is a discussion post from the forum. I have already refined it.
Among them, huangwen9 on the 35 th floor and huangpeihp on the 37 th Floor provide correct explanations.
Original post here:
The exception object is an instance of throwable, which represents errors and exceptions generated in JSP scripts and is part of the JSP page exception mechanism. You do not need to handle exceptions in JSP scripts, even checked exceptions. In fact,
Response indicates the server's response to the client. Most of the time, the program does not need to use response to respond to client requests, because there is a simpler response object ------ out, which represents the page output stream, and it
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