Take the project name test as an example:(1) obtain the full path of the current page containing the Project name: request. getrequesturi ()Result:/test. jsp(2) obtain the Project name: request. getcontextpath ()Result:/test(3) Get the full name
The process of developing and using JSP custom tags:
1. Development label implementation class.Hellotag_interface.java file content:Import javax. servlet. jsp. tagext. Tag;
Import javax. servlet. jsp. pagecontext;
Import javax. servlet. jsp.
// Note: Chinese file names such as "target page. jsp" are not recommended.
1. Response jump:
// Jump with session and without request (client jump)Responst. sendredirect ("target page. jsp ");
2. Forward jump:// Jump with session and request
JSP actions mainly include the following:
1.
Javabean is a special type of Java class. Compared with common Java classes, it has two special methods: Set... (Method for setting attributes), get... (Method for retrieving attribute values ). the
1. jsp implicit object1. jsp implicit objects are instances of a group of classes managed by JSP Container loading.
* JSP implicit objects are defined in the _ jspservice method. Therefore, they can only be used in expressions and scriptlet. 2. jsp
When a JSP parameter is passed today, Chinese characters are garbled and added on the pageCode:
Pageencoding = "UTF-8" %>
The Chinese characters are displayed normally.
Recently, I changed some default encoding settings of myeclipse, which
A solution to the problem of JSP data and JavaScirpt Data Interaction for WEB programs, front-end (JavaScript) and backend (JSP/Servlet) cannot share data, only the back-end program (JSP) can output data and generate pages to the front-end. At this
Method 1: the simplest and most commonly used method
Or here, you can use gb2312 or GBK, which is only a string of many characters supported by GBK than gb2312.
This method is used to display Chinese characters on the JSP page.
Method 2: Use a
The following methods are summarized to solve the problem of JSP Chinese display: 1. Add a Statement on the jsp page: the Chinese display is normal. 2. For the text box from the webpage, use String parameter = request. the String obtained by
The interaction between JSP and XML in the JSP and XML document published by skynet in May 2 only mentions one way to use the tag library. There are two important ways to interact between JSP and XML, therefore, in this article, I would like to
Making adjustable boundaries
In Figure A, a pie chart has a boundary. How can we change the boundary size? You can first define int border = 10, and then calculate the size of the area within the boundary to achieve the following:Ellipse2d. Double
I have searched the internet for many times and found that there are few examples of jsp + sqlserver2000 project development. In Tomcat 5, configure the server. xml becomes a problem because many mysql and oracle configuration examples are available
[From] http://developer.51cto.com/art/200907/140294.htm
==> Connection and difference between JavaScript and Java
JavaScript is similar to Java syntax, but similar to C and Java syntax. But it is not the Java prefix of JavaScript that expresses
A multi-choice drop-down box is used in the project. I am too lazy to search for it online. I tried to write a simple drop-down box and paste it for my reference.
This section of JS controls various events (multiSelect. js)
/*** created by
1. JspTags are the logical business functions provided.JspWrite inJavaCode, the main labels are
Can contain otherJspFile, which can be directly added to double quotation marks
To jump to the tab page, you can directly add
You can directly add a
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.