JSP page
When using the JSTL's expression language, the request parameters are made in the available object implicit. This example demonstrates you to include the value of a request parameter from the query string or posted data in the gene Rated
Today encountered a time format conversion of Dongdong, depressed half of the afternoon, but fortunately finally finished.
Originally wanted to take YYYY-MM-DD format, but how the whole is Greenwich mean.
Our project is to use the Struts framework,
A. Requestdispatcher.forward ():
is the server-side effect. When using forward (), the Servlet container passes HTTP requests from the current servlet or JSP to another servlet,jsp or normal HTML file, which means that your form is submitted to
The exception information in web development is very heavy information, it is very important to the developer, it is more important to convert these exception information to the information that the user can understand ~
In the simple JSP
One, Page object
The Page object represents the JSP itself, or rather, it represents the JSP-translated servlet, which can invoke the method defined by the Servlet class.
Two, config object
The Config object holds some of the servlet's initial data
These two days in the development process encountered a strange problem: the same Web application, the same JSP in different operating systems to be handled through different processing to solve the garbled problem.
The default encoding for JSP
Recently, a project in my need to use a date plugin to show the time, online search, and finally decided to use My97datepicker, color good-looking, layout is also very reasonable, but the use of the time encountered many problems, the biggest
To learn the Java-ee so far, the project has only done two, midway encountered some problems, the most likely to be a number of Chinese display and insert the database of Chinese problems. The summary is as follows:
(a) Define the Chinese conversion
Recently in their own projects need to use online editor, search on the internet, found CKEditor, of course, there are several online editors, do not know why the choice of CKEditor, originally intended to use FCKeditor, but see the Internet also
Iv. Write labels with label bodies
Need to return to Tagsupport.eval_body_include, you can enter the label body;
Attributetag.java
Package org.tagext;
Import javax.servlet.jsp.tagext.*;
Import javax.servlet.jsp.*;
public class Attributetag
See a lot of online paging function realization, some feel too messy, some really do not understand, may be their own knowledge is not enough.
According to their knowledge, packaging pagination method, in the interface to achieve, for everyone to
The relative paths that are invoked in the JSP and class files are different.
In JSP, the root directory is webroot in the class file, the root directory is webroot/web-inf/classes of course you can also use System.getproperty ("User.dir") to obtain
We said that the Web-inf directory has *.xml classes lib directories and files, they are generally not let direct access.
Description of this directory is safe, we recall why not JSP, HTML and other page files into it.
Will it be safer? It's a
1. click
Jump with Link (get method)
2.
Add in , change form action with script, control jump (Get Way)
3.
Jump directly with form (post or Get method)
Write Excel file in JSP
Excel is one of the most common office software. In a Java application, a subset of the data generated in Excel format is an important means of seamlessly connecting with other systems. POI is a sub project of Apache
Create manually
1. Create a new directory under the WebApps directory of Tomcat 6.0 's installation directory, named MyApp. 2, in the MyApp directory to create a new directory Web-inf, note that the directory name is case-sensitive. 3, Web-inf under
Package com.sun.servlet;
Import java.io.IOException;
Import Java.net.DatagramPacket;
Import Java.net.DatagramSocket;
Import java.net.InetAddress;
/** * Host A sends a "UDP-NETBIOS-NS" query packet to Host B, that is, to host B's 137 port and sends
One, what is a built-in object?
In JSP development will be used frequently to some objects, such as ServletContext HttpSession PageContext and so on. If we need to use these objects in our JSP pages each time we have to create them ourselves, it
To implement the Save Access data, you cannot use the session because sessions belong to the same conversation, and when you close the browser, the data is gone. Therefore, you can use the Application object because the application is in the same
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service