Previously, we reduced the number of bytes, the number of requests, and the loading order to make the page Load faster. Today, we are increasingly paying attention to another part that affects website performance-CPU utilization. Using jQuery and
Jquery: JS library;Jquery Selector1. jquery element selector $ ("p") select p element $ (". p") Select element of class = p $ ("# p") Select element of id = p2. jquery attribute selector $ ("[href]"); select an element with the href attribute $
"Window. location. href" and "location. href" indicate the current page Jump."Parent. location. href" is the previous page Jump"Top. location. href" is the outermost page Jump Example:If A, B, C, and D are all jsp, D is the iframe of C, C is the
Java codeIn principle, it is the trigger event of tr binding.Java code Java code// Click the mouse to trigger detailed display of a single row$ (Function (){$ ("# Demo tr"). bind ('click', function (){Var node = $ (this );Var list_RowIdNodes = node.
BodyTagSupport execution sequence
Methods for loading the BodyTagSupport class:
When writing the implementation class corresponding to the label, you need to reload several methods of the BodyTagSupport class: doStartTag (), setBodyContent (),
Framework mainly involves technologies: Spring + Struts2 + Hibernate + Freemarker
Let's take a look at the working principle of Struts2, so that we can easily consider the expansion points when designing the development
Data garbled during form submission:For get method submission:Find the server. xml in the conf folder under the tomcat installation path, and click Add URIEncoding = "UTF-8". See the red text section.ConnectionTimeout = "20000"RedirectPort = "8443"
when the types in the tag are password and text, their default length and width are inconsistent, and the length and width of the types in the logon box are usually set to be consistent. The following methods can be used to make them consistent
There are five jsp action elements The first category is related to the access to JavaBean, including: The second type is the basic elements starting with JSP1.2, including 6 action elements. The third type is the newly added elements of
Set the JavaBean in the page range 0102030405 set the page range 06070809 page " class = "com. javaweb. ch07.UserBean "> 1011121314150102030405 set the page range 06070809 page " class = "com. javaweb. ch07.UserBean "> 1011121314Set the JavaBean in
In c #, multiple parameters are transmitted using URLs using Java statements,
Original statement: String str = " ";
However, I couldn't pass the parameter either. I searched the website and found no practical method. Later, an unintentional
Page1.jsp:
I put the value in the session.
Page2.jsp:
To display
Last Logon IP Address: [$ {sessionScope. lastLoginIp} ] Amount calculated the day before yesterday: [$ {sessionScope. total.pdf} ] RMB Last Logon Time: [$ {sessionScope.
Public String getImgFromByte (){// Obtain the byte [] data of the Image Based on the business logic
.......
InputStream buffin = new ByteArrayInputStream (/* byte [] Data */);String str = picUrl. getImageType ();String imgtype [] = str. split
JSF is used in recent projects. The requirement is to download a page to download files to the client. In addition, unlike downloading a single file, this download is a ZIP file, which is to first compress the files in the specified directory before
Use accessors to read data from JavaBean 01Package com. javaweb. ch08;02Import java. util .*;03// A simple JavaBean example04Public class Person {05// Name attribute06Private String name;07// Age attributes08Private int age;09// Sex
[Html](1) Configure struts2 in eclipse (2) copy the struts2-spring-plugin-2.0.11.2.jar package to the WEB-INF \ lib directory(3) Configure spring in web. xml org. springframework. web. context. ContextLoaderListener Remember, if you have used spring
Nine implicit objects The scope of JSP implicit objects is limited to Servlet's _ jspService method. Therefore, these implicit objects cannot be used in JSP declarations.PageContext pageContext = null;HttpSession session = null;ServletContext
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