Final 考点
- XML: 4 questions
- XML Schema: 5 questions
- XML parsing: 4 questions
- XSL/XPath: 6 questions
- SOAP/REST: 8 questions
- JSP: 7 questions
- Web Application/ Web Service/ cloud computing: 5 questions
- Architectures and design patterns: 5 questions
课程总结
JSP
JSP Actions
-
<Jsp:useBean>
- <JSP:get/setProperty>
- <JSP:include>
-
<JSP:forward>
JSP directives
- <%@ page … %>
- <%@ include … %>
-
<%@ taglib … %>
Scope (4d大域)
SCOPE |
WHERE SAVED |
Page |
only current page |
Request |
active request |
Session |
current session (the best) |
Implicit Objects
out |
javax.servlet.jsp.JspWriter |
request |
javax.servlet.http.HttpServletRequest |
response |
javax.servlet.http.HttpServletResponse |
session |
javax.servlet.http.HttpSession |
application |
javax.servlet.ServletContext |
exception |
javax.servlet.jsp.JspException |
page |
java.lang.Object |
pageContext |
javax.servlet.jsp.PageContext |
config |
javax.servlet.ServletConfig |
JAXB
- Marshalling(SAVE) – Write to file XML
- Unmarshalling(LOAD) – Read from file XML
Annotations
@XmlAccessorType(XmlAccessType.FIELD) |
Automatically map every field w. XML element if names are same |
@XmlRootElement(name=”user”)
|
Map Java class to XML root element |
@XmlElement(name=”email”)
|
Map field to XML element |
@XmlElementWrapper(name=”user”)
|
Add a wrapper XML element to list of child elements |
@XmlAttribute(name=”list”)
|
Map field to XML attribute w. particular name |