1 16 package org.directwebremoting.dwrp; 17 18 import java.io.IOException ; 19 import java.io.PrintWriter ; 20 21 import org.directwebremoting.extend.EnginePrivate; 22 import org.directwebremoting.util.MimeConstants; 23 24 28 public class HtmlCallMarshaller extends BaseCallMarshaller 29 { 30 33 protected String getOutboundMimeType() 34 { 35 return MimeConstants.MIME_HTML; 36 } 37 38 41 protected void sendOutboundScriptPrefix(PrintWriter out, String batchId) throws IOException 42 { 43 synchronized (out) 44 { 45 out.println("<html><body><script type='text/javascript'>"); 46 out.println(EnginePrivate.remoteBeginIFrameResponse(batchId, true)); 47 } 48 } 49 50 53 protected void sendOutboundScriptSuffix(PrintWriter out, String batchId) throws IOException 54 { 55 synchronized (out) 56 { 57 out.println(EnginePrivate.remoteEndIFrameResponse(batchId, true)); 58 out.println("</script></body></html>"); 59 } 60 } 61 62 65 protected void sendScript(PrintWriter out, String script) throws IOException 66 { 67 synchronized (out) 68 { 69 out.println(EnginePrivate.remoteEval(script)); 70 } 71 } 72 } 73 | Popular Tags |