This article describes the JSP to obtain the current directory implementation methods, share for everyone to reference. The implementation methods are as follows:
1, using the System.getproperty () function to get the current path:
The code is as
Today, my colleagues from the new energy Test team came to me to see a strange phenomenon. A tomcat application with only a single JSP page, and this JSP page does not have any Java code (want to use this JSP page to test the maximum QPS of a tomcat
The JSP development environment is where you use to develop, test, and run JSP programs.
This section will take you to build a JSP development environment, including the following steps.
Configuring the Java Development tool (JDK)
This step
JSP page passing parameters in the URL will appear garbled
The workaround is as follows:
First, use the method of changing Tomcat. This method is simple, but need to change the location of the server software level, if a slight change in the
Today, in the project encountered a problem, two JS page to share a JS object. JS global variables and static variables are not good, other hard to force the small farmers do not have to insist. And LZ do not want to use cookies to store, one is
Nine kinds of objects of JSP I am Brief:PageApplicationRequestResponseSessionConfigOutPageContextPage
ResponseResponse.setheader ("Pragma", "No-cache");Response.setheader ("Cache-control", "No-cache");Response.setdateheader ("Expires", 0);%>
The items type in first create a label processor class that defines two attributes, String var; Object items; because items want to iterate over various collections, use object; then rewrite the setter method; www.2cto.com declares a member
JavaBean is a Java-based software component. JSP provides complete support for integrating JavaBean components in WEB applications. This support not only shortens development time (can directly leverage tested and trusted existing components, avoids
Method One: The simplest is the most used method <%@ page language="java" pageEncoding="GBK" %>
or
This method is used for Chinese display in JSP pages.
Method Two: Use the filter
Filters are used primarily for form submissions, and data is
This article mainly introduces the use of JavaBean in JSP examples, while introducing the relevant attributes, the need for friends can refer to the
The code in the test.jsp is shown below
The code is as follows:
News:
: Represents an instance
This article is mainly on the JSP page to insert CSS style three ways to summarize the introduction, the need for friends can come to the reference, I hope to help you1, external style when the style needs to be applied to many pages, the external
To automatically generate static pages, it is a good idea to intercept JSP requests with filter and preprocess them first to generate HTML automatically. An easy way to think of this is to redirect a servlet after the filter has been intercepted,
Cookies should be a technology that has been used for a long time. As early as the HTML appeared, there was no way to record and identify different users between each individual page. Later, people invented the cookie technology, when the user
JS about JSP publishing map Services
First, we introduce the arsims for publishing the map service.
Arsims is a multi-layer architecture composed of the presentation layer, Business logic layer, the data layer, and it also has an application set
JS Memory login Jump can be played to facilitate the user to use GetHeader ("Referer"); the way is simple but can not handle post parameters are used in the struts,webwork, in order to easily see the rewrite into JSP way
----------------------------
js|web| Program | solve | problems | Chinese this time often see someone ask how Chinese is always the number in web development. The reason is simple, because most people use Tomcat servers, and the Tomcat server's default encoding is iso-8859-1
Application|js|request|session application and session is relatively simple, here is the main description of the request and page scope.
Application: Global scope, the entire application is shared, that is, the same webapp share in the deployment
js| Standard | question
I just started to learn JSP, recently saw the standard logo library This section, the problem is really a lot of csdn on the issue of my question, incredibly only one person to reply. Dizzy.
Let's talk about these two
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.