01: /*
02: ItsNat Java Web Application Framework
03: Copyright (C) 2007 Innowhere Software Services S.L., Spanish Company
04: Author: Jose Maria Arranz Santamaria
05:
06: This program is free software: you can redistribute it and/or modify
07: it under the terms of the GNU Affero General Public License as published by
08: the Free Software Foundation, either version 3 of the License, or
09: (at your option) any later version. See the GNU Affero General Public
10: License for more details. See the copy of the GNU Affero General Public License
11: included in this program. If not, see <http://www.gnu.org/licenses/>.
12: */
13:
14: package org.itsnat.impl.core.response;
15:
16: import java.io.IOException;
17: import java.io.Writer;
18: import javax.servlet.ServletResponse;
19: import org.itsnat.core.ItsNatException;
20: import org.itsnat.core.event.ItsNatServletRequestListener;
21: import org.itsnat.impl.core.*;
22: import org.itsnat.impl.core.listener.dom.OnUnloadListenerImpl;
23: import org.itsnat.impl.core.html.ItsNatHTMLDocumentImpl;
24: import org.w3c.dom.events.EventTarget;
25:
26: /**
27: *
28: * @author jmarranz
29: */
30: public class ResponseLoadScriptImpl extends ResponseImpl {
31:
32: /** Creates a new instance of ResponseNormalLoadDocImpl */
33: public ResponseLoadScriptImpl(
34: ItsNatServletResponseImpl itsNatResponse) {
35: super (itsNatResponse);
36: }
37:
38: protected boolean isJavaScript() {
39: return true;
40: }
41:
42: public void process(Writer out) throws IOException {
43: ItsNatDocumentImpl itsNatDoc = itsNatResponse
44: .getItsNatDocumentImpl();
45:
46: String code = itsNatDoc.getScriptLoadCode();
47: out.write(code);
48: }
49:
50: }
|