01: /*
02: * Title: HeadTag
03: * Description:
04: *
05: * This software is published under the terms of the OpenSymphony Software
06: * License version 1.1, of which a copy has been included with this
07: * distribution in the LICENSE.txt file.
08: */
09:
10: package com.opensymphony.module.sitemesh.taglib.decorator;
11:
12: import java.io.IOException;
13:
14: import javax.servlet.jsp.JspException;
15:
16: import com.opensymphony.module.sitemesh.HTMLPage;
17: import com.opensymphony.module.sitemesh.taglib.AbstractTag;
18:
19: /**
20: * Write original HTMLPage head to out.
21: *
22: * @author <a href="joe@truemesh.com">Joe Walnes</a>
23: * @version $Revision: 1.3 $
24: *
25: * @see com.opensymphony.module.sitemesh.HTMLPage#writeHead(java.io.Writer)
26: */
27: public class HeadTag extends AbstractTag {
28: public final int doEndTag() throws JspException {
29: HTMLPage htmlPage = (HTMLPage) getPage();
30: try {
31: htmlPage.writeHead(getOut());
32: } catch (IOException e) {
33: throw new JspException("Error writing head element: "
34: + e.toString(), e);
35: }
36: return EVAL_PAGE;
37: }
38: }
|