servlet映射及定义servlet...以及给context传参数值.

解决方案 »

  1.   

    这个context具体指什么呢?
    ms很多时候也可以不定义这个context,然后带的这个<context-param>定义的两个xml文件传给谁了?
    什么时候什么地方可以用?
      

  2.   

    <context-param> Initialization parameters for the entire 0 or more
    application
      

  3.   

    Context parameters are mechanisms used for setting application-initialization parameters. For example,
    you could set the URL to a database here. The following example enables the administrator to change
    the title and greeting of the example application:
    <context-param>
    <param-name>title</param-name>
    <param-value>Wrox example application – Chapter 6</param-value>
    </context-param>
    <context-param>
    <param-name>greeting</param-name>
    <param-value>Welcome to the example application</param-value>
    </context-param>
    There may be any number of context parameters in the application, known as initial parameters. Each
    dynamic resource (such as a Servlet, a JSP page, or a class) with access to the application context is able
    to look up the value associated with a given parameter name. Typical items provided as a context
    parameter are the debug status of the application, the verbosity of logging (these two are often interlinked),
    and as much other externalized configuration as the application developer has allowed.
      

  4.   

    context不定义是没关系的,不定义就按默认的来,从你的context来看是调用了你的一个数据源和一个整个项目的配置文件