Dev/Java
[java] JSP
냐옴
2012. 11. 14. 10:45
JSP - Quick Guide
https://www.tutorialspoint.com/jsp/jsp_quick_guide.htm
JSP - Quick Guide - Tutorialspoint
www.tutorialspoint.com
page < request < session < application
JSP Directive
<%@ page ... %>
<%@ include ... %>
<%@ taglib ... %>
JSP Declaration
<%!
private void testMethod1() {
System.out.println("testMethod1");
}
%>
<jsp:declaration>
private void testMethod2() {
System.out.println("testMethod2");
}
</jsp:declaration>
JSP Scriptlet
<%
// java code
%>
<jsp:scriptlet>
// java code
</jsp:scriptet>
JSP Expression
<%= someVariable %>
<jsp:expression>
someVariable
</jsp:expression>
JSP Comment
<%-- jsp comments --%>
JSP Action
<jsp:action_name attribute="value" />
<jsp:include />
<jsp:useBean />
<jsp:setProperty />
<jsp:getProperty />
<jsp:forward />
<jsp:plugin />
<jsp:element />
<jsp:attribute />
<jsp:body />
<jsp:text />
JSP Implicit Objects
request (HttpServletRequest)
response (HttpServletResponse)
out (PrintWriter)
session (HttpSession)
application (ServletContext)
config (ServletConfig)
pageContext (JspWriters)
page (this)
Exception (Exception)