Bài 7: Thư viện jQuery và thư viện jQuery UI - Giáo trình FPTMasterCode.vn
Thự viện và cách tạo thư viện
Thư viện JavaScript
Sử dụng thư viện jQuery
Sử dụng jQuery để tạo hiệu ứng
Hiệu ứng ẩn hiện
Hiệu ứng mờ
Hiệu ứng chuyển động
Sử dụng thư viện jQuery UI
Tạo tính năng kéo thả (drag and drop)
Tạo menu chồng nhau
Thự viện và cách tạo thư viện
Thư viện JavaScript
Sử dụng thư viện jQuery
Sử dụng jQuery để tạo hiệu ứng
Hiệu ứng ẩn hiện
Hiệu ứng mờ
Hiệu ứng chuyển động
Sử dụng thư viện jQuery UI
Tạo tính năng kéo thả (drag and drop)
Tạo menu chồng nhau
Tài liệu tìm hiểu jQuery dành cho người mới bắt đầuLel Đặng Văn
Tài liệu này hướng dẫn những bạn mới bắt đầu học làm việc với jQuery trong việc viết Client Script khi thiết kế website. Những mô tả và hướng dẫn trong tài liệu này là hết sức căn bản và chưa có hướng dẫn nâng cao nào.
Bài 12: JSF-2 - Lập Trình Mạng Nâng CaoTuan Nguyen
The document discusses how to build a basic JavaServer Faces (JSF) application for a calculator. It includes declaring the Faces servlet in web.xml, configuring faces-config.xml, creating a Calculator bean class to manage data, building the views using JSF tags in JSP pages, and applying CSS styling. The application allows users to enter two numbers, select an operation, and see the result.
This document summarizes various web coding security vulnerabilities including SQL injection, cross-site scripting (XSS), and file uploads. For SQL injection, it provides examples of vulnerable code and discusses preventing vulnerabilities using prepared statements. For XSS, it discusses persistent and non-persistent types and provides examples of vulnerable code and prevention through input validation and output encoding. For file uploads, it provides examples of vulnerable upload code and discusses prevention by storing files outside the web root and using system-generated filenames.
Bài 7: Thư viện jQuery và thư viện jQuery UI - Giáo trình FPTMasterCode.vn
Thự viện và cách tạo thư viện
Thư viện JavaScript
Sử dụng thư viện jQuery
Sử dụng jQuery để tạo hiệu ứng
Hiệu ứng ẩn hiện
Hiệu ứng mờ
Hiệu ứng chuyển động
Sử dụng thư viện jQuery UI
Tạo tính năng kéo thả (drag and drop)
Tạo menu chồng nhau
Thự viện và cách tạo thư viện
Thư viện JavaScript
Sử dụng thư viện jQuery
Sử dụng jQuery để tạo hiệu ứng
Hiệu ứng ẩn hiện
Hiệu ứng mờ
Hiệu ứng chuyển động
Sử dụng thư viện jQuery UI
Tạo tính năng kéo thả (drag and drop)
Tạo menu chồng nhau
Tài liệu tìm hiểu jQuery dành cho người mới bắt đầuLel Đặng Văn
Tài liệu này hướng dẫn những bạn mới bắt đầu học làm việc với jQuery trong việc viết Client Script khi thiết kế website. Những mô tả và hướng dẫn trong tài liệu này là hết sức căn bản và chưa có hướng dẫn nâng cao nào.
Bài 12: JSF-2 - Lập Trình Mạng Nâng CaoTuan Nguyen
The document discusses how to build a basic JavaServer Faces (JSF) application for a calculator. It includes declaring the Faces servlet in web.xml, configuring faces-config.xml, creating a Calculator bean class to manage data, building the views using JSF tags in JSP pages, and applying CSS styling. The application allows users to enter two numbers, select an operation, and see the result.
This document summarizes various web coding security vulnerabilities including SQL injection, cross-site scripting (XSS), and file uploads. For SQL injection, it provides examples of vulnerable code and discusses preventing vulnerabilities using prepared statements. For XSS, it discusses persistent and non-persistent types and provides examples of vulnerable code and prevention through input validation and output encoding. For file uploads, it provides examples of vulnerable upload code and discusses prevention by storing files outside the web root and using system-generated filenames.
The document contains 41 multiple choice questions about VMware certification exam 2V0-621D. The questions cover topics like vSphere permissions, ESXi security configurations, vCenter Server security certificates, and virtual machine security hardening. An administrator is seeking to reduce the memory overhead for a 3D graphics enabled virtual machine by adding the "vga.vgaOnly=TRUE" advanced configuration option to the virtual machine settings file.
Java Bean is a reusable software component that can be visually assembled into applications using visual development tools. It follows specific conventions like having public no-arg constructors, allowing properties to be read and written with get/set methods, and firing events. Beans are customizable, portable, and can persist their state. Introspection allows determining a bean's properties, methods, and events at runtime.
The document discusses various theories and styles of leadership. It defines leadership as the ability to influence others towards achieving a common goal. Some key points made are:
1) There are different theories of leadership including trait theory, behavioral theory, contingency theory and situational theory.
2) Common leadership styles discussed are authoritarian, democratic, and laissez-faire.
3) Additional models covered include Fiedler's contingency model, path-goal theory, the managerial grid, and Likert's leadership systems.
4) Factors that influence leadership effectiveness include the leader, followers, communication skills, and adapting to different situations.
2. Mô hình công nghệ
Các mã g i tr c ti p Servletọ ự ế
Các mã g i Servlet không tr c ti p (JSP)ọ ự ế
Beans
Servlet/JSP
MVC v i s k t h p JSP, Servlet, Beanớ ự ế ợ
Custom tag
MVC v i Bean, Custom tag, và cácớ
framework h tr Structs ho c JSF.ỗ ợ ặ
ng D ngỨ ụ
đ n gi nơ ả
ng D ngỨ ụ
ph c t pứ ạ
3. Các d ng Custom Tagạ
Tag Files
Simple Tag handlers
Classic Tag handlers
5. Các b c đ t o m t Tagướ ể ạ ộ
B c 1: K th a l p SimpleTagSupport vàướ ế ừ ớ
vi t đè ph ng th c doTag().ế ươ ứ
package my;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.*;
public class Simple extends SimpleTagSupport {
public void doTag() throws IOException, JspException
{
getJspContext().getOut().append("Hello from a
simple tag handler!!");
}
}
6. Các b c đ t o m t Tag (1)ướ ể ạ ộ
Đ nh nghĩa t p tin (.TLD) miêu t tag trong thị ậ ả ư
vi n. Đ t t p tin này trong th m c WEB-INF.ệ ặ ậ ư ụ
<?xml version=“1.0” encoding=“UTF-8” ?>
<taglib ...>
<uri>nikojava</uri>
<tag>
<name>simple</name>
<tag-class>my.Simple</tag-class>
<body-content>empty</body-content>
</tag>
</taglib>
7. Các b c đ t o m t Tag (2)ướ ể ạ ộ
G i th ra s d ng.ọ ẻ ử ụ
<%@ taglib prefix="yo" uri="nikojava" %>
<html>
<body>
<yo:simple />
</body>
</html>
8. X lý n i dung th tagử ộ ẻ
S d ng ph ng th c invoke.ử ụ ươ ứ
Đ nh nghĩa thông tin th .TLDị ẻ
public class Simple extends SimpleTagSupport {
public void doTag() throws IOException, JspException {
getJspContext().getOut().print("This is my body:<br />");
getJspBody().invoke(null);
}
}
<tag>
<name>simple</name>
<tag-class>my.Simple</tag-class>
<body-content>scriptless</body-content>
</tag>
9. X lý n i dung th tag (1)ử ộ ẻ
G i th ra s d ng.ọ ẻ ử ụ
<%@ taglib prefix="yo" uri="nikojava" %>
<html> <body>
<yo:simple>Some useful content</yo:simple>
</body> </html>
10. Đ nh nghĩa thu c tính bên trong thị ộ ẻ
G i th ra s d ng.ọ ẻ ử ụ
public class Simple extends SimpleTagSupport {
public void doTag() throws IOException, JspException
{
getJspContext().setAttribute("friend", "Niko");
getJspBody().invoke(null);
}
}
<%@ taglib prefix="yo" uri="nikojava" %>
<html> <body> <yo:simple>Hello ${friend}!!</yo:simple>
</body></html>
11. Đ nh nghĩa thu c tính bên trong thị ộ ẻ
(1)
public class Simple extends SimpleTagSupport {
private String friend;
public void doTag() throws IOException, JspException {
getJspContext().getOut().append("Hello " + friend + "!!");
}
public void setFriend(String friend) { this.friend = friend; }
}
12. Đ nh nghĩa thu c tính bên trong thị ộ ẻ
(1)
<tag>
<name>simple</name>
<tag-class>my.Simple</tag-class>
<body-content>empty</body-content>
<attribute>
<name>friend</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<%@ taglib prefix="yo" uri="nikojava" %>
<html> <body>
<yo:simple friend="Niko" />
</body></html>
13. Đ nh nghĩa thu c tính đ ngị ộ ộ
public class Simple extends SimpleTagSupport implements
DynamicAttributes
{
private Map<String, Object> map = new HashMap<String, Object>();
public void setDynamicAttribute(String uri, String name, Object value)
{ map.put(name, value); }
public void doTag() throws IOException, JspException {
JspWriter out = getJspContext().getOut();
out.append("These are the dynamic attributes:");
out.append("<ul>");
for (Map.Entry<String, Object> element : map.entrySet())
{ out.append("<li>");
out.append(element.getKey() + " ⇒ " + element.getValue());
out.append("</li>");
}
out.append("</ul>"); }}
14. Đ nh nghĩa thu c tính đ ng (1)ị ộ ộ
<tag>
<name>simple</name>
<tag-class>my.Simple</tag-class>
<body-content>empty</body-content>
<dynamic-attributes>true</dynamic-attributes>
</tag>
<%@ taglib prefix="yo" uri="nikojava" %>
<html> <body>
<yo:simple friend="Niko" casoline="soft" more="lagi" />
</body></html>
15. B qua ph n còn l i c a trangỏ ầ ạ ủ
public class Simple extends SimpleTagSupport {
public void doTag() throws IOException, JspException
{
getJspContext().getOut().append("Encapsulation");
throw new SkipPageException();
}
}
<%@ taglib prefix="yo" uri="nikojava" %>
<html> <body>
(Start of page)
<yo:simple />
(End of page)
</body></html>