com.dyuproject.web
Class DevScriptServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.dyuproject.web.DevScriptServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class DevScriptServlet
extends HttpServlet

A utility servlet that serves a javascript file that is external from the webapp. Refreshes the content-served when content changes.

Author:
David Yu
See Also:
Serialized Form

Field Summary
static String CONTENT_TYPE
           
 
Constructor Summary
DevScriptServlet()
           
 
Method Summary
 byte[] getScript()
           
 void init()
           
 void service(HttpServletRequest request, HttpServletResponse response)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_TYPE

public static final String CONTENT_TYPE
See Also:
Constant Field Values
Constructor Detail

DevScriptServlet

public DevScriptServlet()
Method Detail

init

public void init()
          throws ServletException
Overrides:
init in class GenericServlet
Throws:
ServletException

getScript

public byte[] getScript()

service

public void service(HttpServletRequest request,
                    HttpServletResponse response)
             throws ServletException,
                    IOException
Overrides:
service in class HttpServlet
Throws:
ServletException
IOException


Copyright © 2013. All Rights Reserved.