Original: http://blog.csdn.net/mingxunzh/article/details/4627185If you use relative paths in a JSP, you may have problems.Because of the "relative path" in the Web page, he is looking for resources relative to "URL request Address".What does it mean by this sentence?As an example:If we have a project: MYAPPUnder this project, there is a JSP folderThis folder includes the following:login.jsp//Landing pageREG
JSP implicit object (1), jsp implicit object1. Initial appearance of JSP implicit objects;
(1) There will always be nine hidden objects during the interview, which will be described in detail below;
(2) In JSP pages, information such as request requests and response responses are often processed. to simplify the progra
JSP three major instructions----------------------------------------------A JSP page, you can have a definition of 0~n instructions!1. Page-and most complex: format: * Pageencoding and ContentType:> pageencoding: It specifies the current JSP page encoding, as long as not to lie, there will be no garbled! You need to use pageencoding! when the server wants to comp
JSP compiler directives are information that notifies the JSP engine that it does not generate output directly. There are three common compiler directives:Page directiveThis directive is a descriptive instruction for the entire JSP page. The syntax format is as follows:The% @page[language= "Java"][extends= "Package.class"][import=] Package. Class|package. *},..."
Learning Points of knowledgeJSP, which will eventually become a servletThe JSP eventually becomes a complete servlet that runs in the Web application, except that the Servlet class is written by the container.The Scriptlet in JSPThe so-called Scriptlet is the Java code placed in the
out.println(com.inspur.Counter.getCount());
%>
Directives in the JSPThe difference between JSP
The js| tutorial (IAVA SERVER pages) is a dynamic Web page production technology developed by Sun in the Java language that allows you to separate the dynamic parts of a Web page from the static HTML. You can use tools that are usually handy and write HTML statements in the usual way. The dynamic parts are then embedded with special tags, which often start with "
Tutorials
It will output "Hello World".
Typically, you want to extend the file to ". JSP
Pass the JSP page value, and pass the jsp page
Parameters passing between JSP pages is a feature that is frequently used. Sometimes, parameters passing between multiple JSP pages are required. The following describes the implementation methods.
(1) Add
For example,
When using response. sendRedirect for page redirectio
Share JSP Chinese garbled code solutions and jsp garbled code
I. garbled Chinese characters on JSP pages
On the JSP page, there are two types of Chinese garbled characters: Chinese garbled characters in HTML and Chinese garbled characters dynamically output in JSP.
First loo
JSP tag, jsp tag Library1. although we want JSP pages to be used only as data display modules and do not nest any java code to introduce any business logic, it is impossible to introduce no business logic in actual development, but the introduction of business logic will lead to ugly java code on the page. How can this problem be solved?Sun allows users to develo
JSP custom tag simple getting started tutorial, jsp custom getting started tutorial
The following is the official sun document.
Official Document statement
public interface SimpleTagextends JspTagInterface for defining Simple Tag Handlers.Simple Tag Handlers differ from Classic Tag Handlers in that instead of supporting doStartTag() and doEndTag(), the SimpleTag interface provides a simple doTag() method, w
JSP/Servlet ----- differences between charset and pageEncoding, and between jsp and servlet
I. Functions of several encodings in JSP/ServletIn JSP/Servlet, encoding can be set in four places (as shown below). The first two can only be used in JSP, and the last two can be use
(1) instruction element: used to send a message from the JSP to the container, such as setting global variables, text encoding, introducing packets, etc.1. PageCommon properties in the page directive:
Language: Defines the scripting language to use, currently only "Java", that is, language= "Java".
Import: The same as the General Java import meaning, used to introduce the class to use, just a comma "," separate the package or class list. Omit
1. Design Ideas
Use the jsp http server to explain the local JSP source file and generate the intermediate java source file. Then, the javac compilation tool is called to compile the java source file into a class file. The jsp http server loads and runs the classes defined in the class file.
2. Key Points of Design
1) JSP
Five jump methods for JSP pages and five jump methods for jsp pages
Five redirect methods for JSP pages1. RequestDispatcher. forward ()
Is used on the server. When forward () is used, the Servlet engine transmits the HTTP request from the current Servlet or JSP to another Servlet,
After the installation, we'll discuss the syntax of the JSP. If you're lazy, you can download the grammar card and if you're unfamiliar with Java programming, you might want to refer to the Sun's manual; However, the site creator should not do much Java development. In addition to a few function calls, the Java program code that appears on your JSP page should minimize it;
With that in mind, let's take a lo
js| notes
The 1.JSP Tag library (also called a custom library) can be viewed as a set of methods that generate xml-based scripts, which are supported by JavaBeans. Conceptually, a tag library is a very simple and reusable code construct. It can greatly simplify the code you enter into various entry boxes in the page (such as code: 2. The tag library (tag libraries) provides a simple way to build reusable blocks of code. But unlike COM and Java EE, you
After the installation, we'll discuss the syntax of the JSP. If you're lazy, you can download the grammar card and if you're unfamiliar with Java programming, you might want to refer to the Sun's manual; However, the site creator should not do much Java development. In addition to a few function calls, the Java program code that appears on your JSP page should minimize it;
With that in mind, let's take a l
JSP Learning (JavaBean), jsp learning javabean
Java Web LearningI,
Build a java web development environment:
(1) install jdk
(2) install the Tomcat server (open source project of Apache), install Tomcat, and set Environment Variables
(3) install EclipseEE (or MyEclipse)II,
Introduction to WEB-INF Security directories (accessible only to servers)
(1) web. xml file (project deployment file ):
When we start a
1. JSPJSP (Javaserverpage) would is supplementary for servlets, rather than be substituted. Because the JSP sloves tow problems of Servlet.such as,first,the HTML tags in servlets all must being enclosed by Java String, Thus,make send HTTP Response become a process complicatedly; Second,all texthtml tags must hard-compiling,so even if revise merely for Presentation Layer,we must re-compile the A Pplication.2. JSP
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.