01: /* DspContext.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Tue Sep 6 15:42:05 2005, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2005 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.web.servlet.dsp;
20:
21: import java.io.Writer;
22:
23: import org.zkoss.util.resource.Locator;
24: import org.zkoss.web.servlet.xel.RequestContext;
25:
26: /**
27: * The context used with {@link Interpreter#interpret}.
28: *
29: * @author tomyeh
30: * @see Interpreter
31: */
32: public interface DspContext extends RequestContext {
33: /** Returns the locator for loading resources, such as taglib.
34: * You might return null if the page not referencing external resources.
35: *
36: * <p>To load the resource from a web application, use
37: * {@link org.zkoss.web.util.resource.ServletContextLocator}
38: * To load the resource from class path, use
39: * org.zkoss.util.resource.Resources.getDefault().
40: */
41: public Locator getLocator();
42:
43: /** Sets the content type of the output.
44: */
45: public void setContentType(String ctype);
46:
47: /** Changes the writer of this context to the specified one.
48: *
49: * @param out the new writer. If null, it is restored to
50: * the default one.
51: */
52: public void setOut(Writer out);
53: }
|