develog

[java] JSP 본문

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)

 

'Dev > Java' 카테고리의 다른 글

try catch finally - Flow test  (0) 2012.11.25
Spring AOP  (0) 2012.11.24
[java] JSTL  (0) 2012.11.14
Primitive Variable  (0) 2012.11.12
Primitive Variable, Wrapper Class  (0) 2012.11.12
Comments