1. homepage (enter a name) (optional, form post to time. jsp ):
Omitted
2. determine the time forward to different pages:
Time. jsp:
CopyCode The Code is as follows: Document: Index
Created on:, 15:48:00
Author: Lucifer
--
Generally, I use the method to include this file. The main reason is that the contained page will be compiled into a file at compilation, the variables can be common to each other, while the method is compiled separately, and the variables cannot
After I modified connectorservlet. Java and simpleuploaderservlet. Java two files, regenerate the fckeditor-java-2.3.jar package, to solve all the garbled problem, there are three to modify
1. modify the character encoding of the Web Container. If
Servlet three elements:
1. must inherit from httpservlet
2. doget () or dopost () must be implemented ()
3. servlet must be configured in Web. xml
Httpserveltrrequest: request objectGetparameter (): Get the value of the form
I. Basic concepts:
1. Tag ):
A tag is an XML element. A tag can simplify and maintain a JSP webpage, and supports multiple language versions for the same JSP file. Because tags are XML elements, their names and attributes are case sensitive.
1. Install j2sdk and resin. (I installed j2sdk in D: \ j2sdk, and resin in the D: \ resin_3.0.8 folder ).
2. environment variables. Right-click my computer and choose Properties> advanced> environment variable.
1) create two system variables (click
1. Configure the context. xml file
CopyCode The Code is as follows: Name = "JDBC/books" // The reference name can be customized.
Auth = "Container" // specify the manager for datasource Management
Type = "javax. SQL. datasource" // specify the
A web project does not have a web. xml file. That is to say, the Web. xml file is not required by the web project.
So when and when?To answer the above question, you must first understand what the web. xml file is used. The Web. xml file is used
1. jsp
Code :
Copy code The Code is as follows: Document: Application
Created on:, 13:18:53
Author: Lucifer
-- %>
Http://www.w3.org/TR/html4/loose.dtd>
JSP page
Get server info:
Get context path:
Get real path:
2. output: copy
However, the real IP address of the client cannot be obtained through reverse proxy software such as Apache and squid. If the reverse proxy software is used, the IP address obtained using the request. getremoteaddr () method is 127.0.0.1 or 192.168.1
1. When declaring a variable: (generate the variable into a member variable of the servlet class, multiple clients share one copy) and when using (only a local variable in a method, each client has one), try to avoid declaring a variable as a
There are a basket of online processing methods. The following describes two effective solutions I have used.
1. Compile a string processing function for the program, save it with a static file, and include it in the JSP page for processing Chinese
1. Set errorPage: errorPage. jsp
Copy codeThe Code is as follows:
JSP Page
Error ~!
2. ApplicationCopy codeThe Code is as follows: // go JSP Page Boolean tf = true;If (tf ){String info = getServletInfo ();Throw new Exception (
After searching for a long time, I finally found a jsp that can be used ...... Share !!
Copy codeThe Code is as follows: PageEncoding = "UTF-8" %>
Management Area
Cellspacing = "1" class = "table_style">
Product image: Solid;
In three steps:
1. Create a folder named tlds under the WEB-INF, and then create a tld file, such as formatTime. tld, the content is:
Copy codeThe Code is as follows:
Http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd>
1.0
1.1
ntuc
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.