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 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 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.
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.
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.
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.
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.
Ví dụ <html> <head> <title>Welcome to HTML</title> </head> <body bgcolor=‘lavender’> <h3>My first HTML document</h3> <p> This is going to be real fun <h2>Using another heading</h2> </p> <p align=„center‟>Another paragraph element</p> </body> </html> Ví dụ 2: <b>This text is bold</b> <strong>This text is strong </strong> <big>This text is big </big> <em>This text is emphasized </em> <i>This text is italic </i> <small>This text is small </small> This text contains a<sub>2</sub> This text contains x<sup>2</sup> = a x a <EM>Computer Sciences</EM> <STRONG>Computer Sciences</STRONG> <DFN>Computer Sciences</DFN> <CODE>Computer Sciences</CODE> <KBD>Computer Sciences</KBD> <VAR>Computer Sciences</VAR> <CITE>Computer Sciences</CITE> <BLINK>Computer Sciences</BLINK> <DEL>Computer Sciences</DEL> <INS>Computer Sciences</INS>
Ví dụ <html> <head> <title>Welcome to HTML</title> </head> <body bgcolor=‘lavender’> <h3>My first HTML document</h3> <p> This is going to be real fun <h2>Using another heading</h2> </p> <p align=„center‟>Another paragraph element</p> </body> </html> Ví dụ 2: <b>This text is bold</b> <strong>This text is strong </strong> <big>This text is big </big> <em>This text is emphasized </em> <i>This text is italic </i> <small>This text is small </small> This text contains a<sub>2</sub> This text contains x<sup>2</sup> = a x a <EM>Computer Sciences</EM> <STRONG>Computer Sciences</STRONG> <DFN>Computer Sciences</DFN> <CODE>Computer Sciences</CODE> <KBD>Computer Sciences</KBD> <VAR>Computer Sciences</VAR> <CITE>Computer Sciences</CITE> <BLINK>Computer Sciences</BLINK> <DEL>Computer Sciences</DEL> <INS>Computer Sciences</INS>
Ví dụ: <a name=“TenViTri"> Vi tri bat dau </a> <a href=“#TenViTri"> Text đại diện </a> <a href=“mailto:emailAddress">Liên hệ Admin</a>
Ví dụ:
Ví dụ: <input type=“text” name=“txtName” value=“This is one line text with 301” size=“20” maxlength=“30”> <textarea cols="20" rows="5" wrap="off“>This is a text on multiline.</textarea> hidden text field : <input type="text" name="txtHidden" value="This is hidden text.You cann't see."> combo box: <select name="DSSoftware"> <optgroup label="Multimedia"> <option value="WM10">Window Media 10</option> <option value="JA9">Jet Audio 9</option> </optgroup> <optgroup label="Operation System"> <option value="WXP">Windows XP</option> <option value="WXPSP2">Windows XP SP2</option> <option value="WVT">Windows Vista</option> </optgroup> <option selected value="Office07">Office 2007</option> </select> Check box group : <br> Anh van: <input type="checkbox" name="Languages" value="En"><br> Hoa: <input type="checkbox" name="Languages" value="Chz" checked><br> Nhut: <input type="checkbox" name="Languages" value="Jp"><br> Radio Button Group : <br> Nam: <input type="radio" name="sex" value="nam" checked><br> Nu: <input type="radio" name="sex" value="nu“checked ><br> Radio Button Group : <br> Nam: <input type="radio" name="sex1" value="nam" checked><br> Nu: <input type="radio" name="sex2" value="nu“checked ><br> Ví dụ form upload file <form name=“frmMain” action=“POST” enctype=“multipart/form-data”> <input type="file" name="fileUpload"> </form>
Ví dụ <H1 STYLE="color: yellow">This is yellow</H1> Ví dụ 2: <HTML> <HEAD> <TITLE> Embedded Style Sheet </TITLE> <STYLE TYPE="text/css"> <!-- P { color: red; font-size: 12pt; font-family: Arial;} H2 { color: green;} --> </STYLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <H2>This is green</H2> <P>This is red, 12 pt. and Garamond.</P> </BODY> </HTML> Ví dụ 3 Trong tập tin MyStyle.CSS H2 { FONT-WEIGHT: bold; FONT-SIZE: 16pt; COLOR: white; FONT-STYLE: italic; FONT-FAMILY: Arial; BACKGROUND-COLOR: red; font-color: white } Trong trang Web có sử dụng MyStyle.CSS <html> <head> <title>FrontPage 98 -Cascading Style Sheets</title> <link HREF="MyStyle.css” REL="stylesheet" > </head> <body> <h2>This is an H2 </h2> </body> </html>
Ví dụ:
Ví dụ: Câu lệnh <input value = ‘He said “Javascript is good” ’> <input type=“button” value=“Click Me!” onclick=“alert(‘Hello’);” Khai báo var x ; var y, sum ; var x = 1, y = -10, sum = 0; Kiêu dư liệu bất kỳ var a = 10; document.write(a + “<br>”); a = a + “10” ; document.write(a); Lệnh if var x = 5, y = 6, z; if (x == 5) {if (y == 6) z = 17; }else z = 20; if (x == 5) z = 7; y = 42; else z = 19; Lệnh switch case var diem = “G”; switch (diem) { case “Y”: document.write(“Yếu"); break; case “TB”: document.write(“Trung bình"); break; case “K”: document.write(“Khá"); break; case “G” : document.write(“Giỏi"); break; default: document.write(“Xuấtsắc") } Vòng lặp var myarray = new Array(); for (i = 0; i < 10; i++) { myarray[i] = i; } Vòng lặp while var i = 9, total = 0; while (i < 10) { total += i * 3 + 5; i = i +5; } Vòng lặp do-while var i = 9, total = 0; do { total += i * 3 + 5; i = i +5; } while (i > 10); Vòng lặp foreach var a = new Array(2); a[0] = 10; a[1] = 20; var e, i = 0, b = new Array(2); for (e in a) { b[i] = e / 10 - 1; i++; } function Sum(x , y) { tong = x + y; return tong; } var x = Sum(10, 20);