It is quite convenient to handle exceptions in struts. Whether it is struts1 or struts2, you can configure global exceptions ~
To print the exception information on the page:
How to deal with struts1:
Use tags directly in struts2:
: outputs
I have learned JSP for more than a year. I read a lot of related books on and off this year, but I still feel that I am not skilled enough. There are a lot of things that you know about, but you just have to look at the projects you have done before.
Basic syntax
There are five types of JSP compiler guidance and Directive elements. after JSP 1.0, most of the JSP is contained in a single tag with as the end. the new JSP 1.1 Specification has been published, and it is also compatible with
The value of a text box in JSP is obtained through the El expression. This is a search function. After Entering Chinese characters, the search is successful. However, after the search is successful, the text box is garbled.Filters, unified JSP page
// First: include command: When JSP is converted to servlet, the specified file is introduced // type 2: action element: introduce the specified file when the JSP page is requested // The second method can easily use to pass
Example
Function circleonclick (EVT ){VaR circle03 = evt.tar getVaR id = circle03.getattribute ('id ')Window. Location = 'HTTP: // localhost: 8080/MyApp/parse_draw.jsp? Xml = dblp. xml & author = '+ ID;}
Or use the link
As follows:
-- Getparameter is of the string type. OrHttp://a.jsp? Id = 123Or the data submitted by a form.-- Getattribute can be an object.-- Getparameter () is used to obtain the parameter value passed by post/get;-- Getattribute () is used to obtain the data
The internet age is actually the data age. Building a large E-commerce system involves a large amount of data display. The paging display of data is a frequent problem, if every programmer needs to consider every detail of data acquisition and
In this article, I will introduce you to a JSP-based and flexible and interesting technology, that is, jstl. jstl is called Java Server Pages standard tag library. although JSP has become very popular, jstl has not been widely used in simple and
Have you ever thought about sending dynamic images from JSP pages (or Servlets? This tip tells you how to do it. To run the code here, you need a tomcat or other web server that supports JSP 1.1.
When a Web page is sent with the MIME type of
I have been learning custom tags recently, so I want to implement some self-contained tag library functions in JSP. By the way, I will also review the reflection mechanism. (If you are not familiar with these two technologies, at the bottom of this
The image is encoded in JPEG format on the JSP page and stored in the specified folder. Compared with component upload, this JSP upload method seems clumsy and cannot perform operations on file attributes. However, it is indeed easy to implement the
I used to upload a single image and want to upload multiple images at a time ~~
Document files.:
Package { Import flash. display. sprite; Import flash. events. event; Import flash. events. mouseevent; Import flash.net. filefilter; public class
There are several methods for page forwarding: 1 requestdispatcher. Forward () 2 response. sendredirect ()
3 4. Modify the location attribute of the HTTP header to redirect 5 pagecontext. forward () I wrote the code to check whether a user is
1. pageencoding:
JSP page code: Code of the JSP file
2. contenttype:
Code displayed on the web page: the code displayed in the browser for the JSP output stream
3. html page charset:
Web page input encoding: font encoding entered in the
Put. jsp
application test
Get. jsp
application test
Refresh put in different browser processes. JSP page, no matter in which browser process access get. the JSP page must get a consistent value, because the counter
Method 1. after the page is fully loaded, run the opentheindexpage () method telecommunications data collection system Method 2, but the effect is not as good as method 1. the second type can only write one function and cannot be
The code in action is as follows:
Code highlighting produced by actipro codehighlighter (freeware)
Http://www.CodeHighlighter.com/
--> List alluser = This. getloginserviceimpl (). Find ();Request. setattribute ("user", alluser );Return Mapping.
Recently, I wrote a JSP video. There is no big problem. Basically, I can understand it and implement it like a gourd. When I wrote an SQL query statement last night, I did not miss a field. It takes 10 minutes to locate the problem. It means that
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.