ErrLog

25-Jun-2021 15:14:57.721 심각 [http-nio-8080-exec-4] org.apache.catalina.core.StandardWrapperValve.invoke 경로 []의 컨텍스트 내의 서블릿 [dispatcher]을(를) 위한 Servlet.service() 호출이, 근본 원인(root cause)과 함께, 예외 [Request processing failed; nested exception is org.apache.tiles.request.render.CannotRenderException: ServletException including path '/WEB-INF/views/template/template.jsp'.]을(를) 발생시켰습니다.
	org.apache.tiles.template.NoSuchAttributeException: Attribute 'content' not found.
		at org.apache.tiles.template.DefaultAttributeResolver.computeAttribute(DefaultAttributeResolver.java:50)
		at org.apache.tiles.template.InsertAttributeModel.resolveAttribute(InsertAttributeModel.java:165)
		at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:121)
		at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299)
		at org.apache.jsp.WEB_002dINF.views.template.template_jsp._jspx_meth_tiles_005finsertAttribute_005f1(template_jsp.java:283)
		at org.apache.jsp.WEB_002dINF.views.template.template_jsp._jspService(template_jsp.java:157)
		at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:71)
		at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
		at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:467)
		at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:378)
		at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:326)
        
        ========중략========

오류 정의 : 'content' Attribute 된 프로퍼티가 없어서 생긴 문제.

tlies를 설정한 .xml 의 definition 프로퍼티 중 content가 다 들어가있는지 확인하자

content는 꼭 들어 가야한다. 

 

Solution

   <definition name="*/*" extends="main_template">
        <put-attribute name="res" value="{1}/{2}" />
    </definition>

<put-attribute name="content" value=""/> 삽입

   <definition name="*/*" extends="main_template">
        <put-attribute name="res" value="{1}/{2}" />
        <put-attribute name="content" value=""/>
    </definition>

+ Recent posts