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.
4. jsp will eventually be converted to servlet for execution.5. jsp declaration format: , script segment format: , when the server converts JSP to servlet, will convert the Declaration in JSP to the classMember variable, and the script segment is
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.
How to install and configure JSP servers under Hongqi desktop linux4.1 in the past two days, I have tried to install Web servers under Hongqi Linux Desktop 4.1, I will introduce the installation process as follows for reference by netizens who have
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.
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
JSF applications require some display technology, such as JSP. One of the cool features of JSP is that it can be expanded with custom tags. A custom tag is a special XML Element supported by Java code. In addition to standard JSP elements or HTML
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.
When Using JSP, you will inevitably encounter Java Chinese garbled characters. There are different solutions for different situations. The following are the garbled issues I encountered and some solutions.
I. Garbled text caused by inconsistent
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:/
In JSP development, Chinese Garbled text is a common problem. Its root cause is: Web containers.DefaultThe character processing encoding of is a ISO-8859-1.
Instance 1: When the JSP page is displayed
Chinese Garbled text-when the JSP page is
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
Preface
Since the JSP 1.1 specification, JSP supports the use of custom tags in JSP. The wide use of custom tags has resulted in repeated definitions by programmers, this has led to the birth of jstl (JavaServer Pages standard tag library.Jstl is
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.