<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-295  評論-26  文章-1  trackbacks-0
    public abstract class HttpServletBean
    extends HttpServlet
    		

    Simple extension of HttpServlet which treats its config parameters (init-param entries within the servlet tag in web.xml) as bean properties.

    HttpServlet的簡單擴(kuò)展用來處理 (init-param)in the web.xml
    A handy superclass for any type of servlet. Type conversion of config parameters is automatic, with the corresponding setter method getting invoked with the converted value. It is also possible for subclasses to specify required properties. Parameters without matching bean property setter will simply be ignored.

    This servlet leaves request handling to subclasses, inheriting the default behavior of HttpServlet (doGet, doPost, etc).

    This generic servlet base class has no dependency on the Spring ApplicationContext concept. Simple servlets usually don't load their own context but rather access service beans from the Spring root application context, accessible via the filter's ServletContext (see WebApplicationContextUtils).

    The FrameworkServlet class is a more specific servlet base class which loads its own application context. FrameworkServlet serves as direct base class of Spring's full-fledged DispatcherServlet.

    public abstract class FrameworkServlet
    extends HttpServletBean
    implements ApplicationListener
    		

    Base servlet for Spring's web framework. Provides integration with a Spring application context, in a JavaBean-based overall solution.

    spring web Framework的基礎(chǔ) servlet? ,提供在以javabean為基礎(chǔ)的整體解決方案已完成與spring應(yīng)用上下文的集成
    This class offers the following functionality:
    1.管理一個(gè)servlet一個(gè)網(wǎng)絡(luò)應(yīng)用上下文實(shí)例,這個(gè)servlet的配置由servlet命名空間里的bean來決定
    2.根據(jù)請求處理發(fā)布事件,是否請求成功的被處理了

    • Manages a WebApplicationContext instance per servlet. The servlet's configuration is determined by beans in the servlet's namespace.
    • Publishes events on request processing, whether or not a request is successfully handled.

    Subclasses must implement doService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) to handle requests. Because this extends HttpServletBean rather than HttpServlet directly, bean properties are automatically mapped onto it. Subclasses can override initFrameworkServlet() for custom initialization.

    因?yàn)樗^承自httpservletBean 所以bean的屬性已經(jīng)被自動(dòng)的裝配了,子類可以通過覆蓋initFrameworkServlet來定制初始化bean

    Detects a "contextClass" parameter at the servlet init-param level, falling back to the default context class, XmlWebApplicationContext, if not found. Note that, with the default FrameworkServlet, a custom context class needs to implement the ConfigurableWebApplicationContext SPI.

    Passes a "contextConfigLocation" servlet init-param to the context instance, parsing it into potentially multiple file paths which can be separated by any number of commas and spaces, like "test-servlet.xml, myServlet.xml". If not explicitly specified, the context implementation is supposed to build a default location from the namespace of the servlet.

    Note: In case of multiple config locations, later bean definitions will override ones defined in earlier loaded files, at least when using Spring's default ApplicationContext implementation. This can be leveraged to deliberately override certain bean definitions via an extra XML file.

    The default namespace is "'servlet-name'-servlet", e.g. "test-servlet" for a servlet-name "test" (leading to a "/WEB-INF/test-servlet.xml" default location with XmlWebApplicationContext). The namespace can also be set explicitly via the "namespace" servlet init-param.



    大盤預(yù)測 國富論
    posted on 2007-08-29 10:13 華夢行 閱讀(685) 評論(0)  編輯  收藏 所屬分類: Spring
    主站蜘蛛池模板: 国产精品免费久久久久影院| 亚洲欧美日韩一区二区三区| 中文字幕在线免费看| 免费日本黄色网址| 麻豆亚洲AV成人无码久久精品 | 黄页网站在线看免费| 久久精品国产亚洲AV麻豆网站| a毛片免费在线观看| 亚洲综合在线另类色区奇米| 一级a性色生活片久久无少妇一级婬片免费放 | 精品无码无人网站免费视频 | 亚洲国产综合在线| 国产h视频在线观看免费| 亚洲AV成人影视在线观看 | 免费一看一级毛片人| AV激情亚洲男人的天堂国语| 在线观着免费观看国产黄| 国产亚洲精品2021自在线| 亚洲国产精品自在拍在线播放| jizz18免费视频| 亚洲av无码精品网站| 巨波霸乳在线永久免费视频| 亚洲另类古典武侠| 中国在线观看免费国语版| 久久久久亚洲AV无码去区首| 亚洲国产人成中文幕一级二级| h视频免费高清在线观看| 亚洲国产成人精品无码区在线观看| 暖暖日本免费中文字幕| 亚洲黄色在线观看| 在线观看成人免费| 高清免费久久午夜精品 | 亚洲 欧洲 日韩 综合在线| 国产在线观看免费视频播放器| 日韩在线观看免费| 久久久久亚洲AV片无码下载蜜桃| 成视频年人黄网站免费视频| 韩国亚洲伊人久久综合影院| 情人伊人久久综合亚洲| 午夜国产精品免费观看| 免费一区二区无码视频在线播放 |