org.soybeanMilk.web.servlet
类 DispatchServlet

java.lang.Object
  继承者 javax.servlet.GenericServlet
      继承者 javax.servlet.http.HttpServlet
          继承者 org.soybeanMilk.web.servlet.DispatchServlet
所有已实现的接口:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class DispatchServlet
extends javax.servlet.http.HttpServlet

框架整合servlet,它可以将WEB请求转给WEB执行器

作者:
earthAngry@gmail.com
另请参见:
序列化表格

构造方法摘要
DispatchServlet()
           
 
方法摘要
 void destroy()
           
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doProcess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          处理WEB请求
protected  ResolverFactory findExternalResolverFactory()
          查找应用的外部解决对象工厂
 java.lang.String getAppExecutorKey()
           
 java.lang.String getEncoding()
           
 WebExecutor getWebExecutor()
           
 void init()
           
protected  void initAppExecutorKey()
          初始化执行器在应用中的存储关键字
protected  void initEncoding()
          初始化框架编码 如果你配置了WebConstants.ServletInitParams#ENCODING参数,框架将使用这个编码, 否则,将使用WebConstants.DEFAULT_ENCODING定义的编码
protected  void initWebExecutor()
          初始化WEB执行器对象。
 
从类 javax.servlet.http.HttpServlet 继承的方法
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
从类 javax.servlet.GenericServlet 继承的方法
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

DispatchServlet

public DispatchServlet()
方法详细信息

getWebExecutor

public WebExecutor getWebExecutor()

getEncoding

public java.lang.String getEncoding()

getAppExecutorKey

public java.lang.String getAppExecutorKey()

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws javax.servlet.ServletException,
                     java.io.IOException
覆盖:
javax.servlet.http.HttpServlet 中的 doGet
抛出:
javax.servlet.ServletException
java.io.IOException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse resp)
               throws javax.servlet.ServletException,
                      java.io.IOException
覆盖:
javax.servlet.http.HttpServlet 中的 doPost
抛出:
javax.servlet.ServletException
java.io.IOException

destroy

public void destroy()
指定者:
接口 javax.servlet.Servlet 中的 destroy
覆盖:
javax.servlet.GenericServlet 中的 destroy

init

public void init()
          throws javax.servlet.ServletException
覆盖:
javax.servlet.GenericServlet 中的 init
抛出:
javax.servlet.ServletException

doProcess

protected void doProcess(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws javax.servlet.ServletException,
                         java.io.IOException
处理WEB请求

参数:
request -
response -
抛出:
javax.servlet.ServletException
java.io.IOException

initEncoding

protected void initEncoding()
初始化框架编码 如果你配置了WebConstants.ServletInitParams#ENCODING参数,框架将使用这个编码, 否则,将使用WebConstants.DEFAULT_ENCODING定义的编码


initAppExecutorKey

protected void initAppExecutorKey()
初始化执行器在应用中的存储关键字


initWebExecutor

protected void initWebExecutor()
初始化WEB执行器对象。 如果你配置了WebConstants.ServletInitParams#SOYBEAN_MILK_CONFIG参数,框架将使用它初始化, 否则,将使用WebConstants.DEFAULT_CONFIG_FILE。 它还会尝试从application作用域中查找标识为WebConstants.ServletInitParams#EXTERNAL_RESOLVER_FACTORY的外部解决对象工厂并加入框架。


findExternalResolverFactory

protected ResolverFactory findExternalResolverFactory()
查找应用的外部解决对象工厂

返回: