JSP Common 7 Action instructions
1, Jsp:forward instructions
Performs a page shift and forwards request processing to the next page
2, Jsp:param instructions
Used to pass parameters
3, Jsp:include instructions
For dynamically introducing a JSP
This article mainly introduces the JSP paging display implementation code, the need for friends can refer to in the past few days in doing JSP message board design process, encountered a problem. First look at a screenshot:
This is random
Apache and Tomcat are the two projects under the Apache Foundation.
One is the HTTP Web server, the other is the servlet container (servlet container), and the latest 5.5.X series implements the Servlet 2.4/jsp 2.0Spec. In our production
about the difference between pageencoding and contenttype two properties in JSP pages:
Pageencoding is the encoding of the JSP file itself
ContentType refers to the content encoding that the server sends to the client
JSP takes
FCKeditor is an open source project above SourceForge.net, which implements the functions of the Online Web page editor, allowing web programs to have powerful editing capabilities such as MS Word. The official website is http://www.fckeditor.net,
An ordinary incorrect is to use JSP as a simplified Java, it is not possible, (in fact, JSP is a simplified servlet) programmers generally try not to learn the necessary support skills and directly learn JSP. JSP is a cohesive technology, and
html.jsp
Here, if you write "web-inf/templates/template.htm", you'll get an error.String FilePath = Request.getrealpath ("/") + "test/template.htm";Out.print (FilePath);String templatecontent= "";
FileInputStream FileInputStream = new
If you have used VB to write the components of the file upload, then the Java file Upload JavaBean is very easy.
The following example is just a simple version
Package yuanyifileup;
Import java.io.*;
Import java.util.*;
Import javax.servlet.*;
Most of the time, most of the JSP documents consist of static text (HTML), and the servlet created to process the page simply passes them to the client
There are two minor exceptions to sending to the client intact:
1. If you want to transfer,
This article mainly introduces the JSP custom label IfElse and traverses the custom label, needs the friend to be possible to refer to under The first example: a simple JSP custom label to get content: first create a JSP instance class and then
The Chinese you want to output in the JSP is displayed as a question mark? This problem can be resolved by selecting Chinese in the search jsp,encoding option in Eclipse-windows-preferencesQuestion: JSP wants to output the Chinese to be shown as "?
JSP actions use you can dynamically insert a file, reuse the JavaBeans component, advance to another page, or generate an HTML for the Java plug-in. The action you can use is:
(1) Jsp:include--Included in a file when the page is requested.
(2) jsp:
An action instruction differs from a compilation instruction in that it notifies the Servlet engine of processing messages, while an action instruction is only a script action at run time. Compilation directives work when compiling a JSP into a
Page garbled
The reason for this garbled is that the character set encoding should not be specified for use in the page: just specify the character set encoding in the beginning of the page with the following code
The code is as
Now have a lot of novice JSP users will often ask the database how to connect ah, how old mistakes ah? So I concentrated in this write an article for your reference, in fact, this database logic all put in the JSP may not be a good practice, but is
FCKeditor is an open source project above SourceForge.net, which implements the functions of the Online Web page editor, allowing web programs to have powerful editing capabilities such as MS Word. The official website is http://www.fckeditor.net,
There are two main ways to pass Chinese parameters in JSP pages:
URL way, for example: http://website/test1.jsp?act=add&type= Orange ¶m=%20d%20bform, for example:The following two cases provide a solution for the correct delivery of Chinese
JSP as an Up-and-comer can occupy a certain position in the server programming environment, and it is closely related to the good support of a series of industry standards. Session is one of the infrastructure that it provides. As a programmer, you
The first is the download tool:
I suggest beginners with EDITPLUS+JDK, I think if used for example Jb,eclipse,jcreator, although the beginning of the time is more convenient, but it does not know how to configure the novice door to the environment
Recently did the project encountered a problem, obviously added Response.sendredirect (), the system also implemented, but it is not jump; finally find the reason on the Internet as follows:First of all, we need to understand the principle of
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.