`
姜中秋
  • 浏览: 86154 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

web.xml配置context-param

阅读更多
发现某学生在web.xml配置
<context-param>
  <param-name>dirver</param-name>
  <param-value>com.mysql.jdbc.Driver</param-value>
  </context-param>
  <context-param>
  <param-name>url</param-name>
  <param-value>jdbc:mysql://localhost:3306/test</param-value>
  </context-param>
  <context-param>
  <param-name>username</param-name>
  <param-name>test</param-name>
  </context-param>
  <context-param>
  <param-name>password</param-name>
  <param-value>test</param-value>
  </context-param>
报异常,解决办法,配置jndi
分享到:
评论

相关推荐

    web.xml中&lt;/context-param&gt;等配置的作用

    了解web.xml的配置信息和加载顺序,有助于理解框架的流程,

    JAVA web.xml配置详解

    -- context-param 元素用来设定web站台的环境参数(context),它包含两个子元素:param-name和param-value.,如spring的典型配置 --&gt; &lt;context-param&gt; &lt;!-- 设定Context名称 --&gt; &lt;param-name&gt;contextConfigLocation...

    web.xml详解(web-app_2_3.dtd)

    部署描述文件web.xml详解(web-app_2_3.dtd),全面介绍: 1. icon元素 2. display-name元素 3. description元素 4. distributable元素 5. context-param元素 6. filter元素 7. filter-mapping元素 8. ...

    解析web.xml中在Servlet中获取context-param和init-param内的参数

    本篇文章是对web.xml中在Servlet中获取context-param和init-param内的参数进行了详细的分析介绍,需要的朋友参考下

    web.xml详细说明

    用于 web.xml 配置详解。例如: &lt;web-app&gt; &lt;display-name&gt;&lt;/display-name&gt;定义了WEB应用的名字 &lt;description&gt;&lt;/description&gt; 声明WEB应用的描述信息 &lt;context-param&gt;&lt;/context-param&gt; context-param元素声明应用...

    web.xml文件标签详解

    &lt;!--该元素声明应用范围内的初始化参数--&gt; &lt;context-param&gt; &lt;!--声明描述信息--&gt;...&lt;param-name&gt;&lt;/param-name&gt; &lt;!--用于指定上下文参数的值--&gt; &lt;param-value&gt;&lt;/param-value&gt; &lt;/context-param&gt;

    spring和hibernate整合

    &lt;param-value&gt;/WEB-INF/spring/*.bean.xml&lt;/param-value&gt; &lt;/context-param&gt; &lt;listener-class&gt; org.springframework.web.context.ContextLoaderListener &lt;/listener-class&gt; &lt;listener&gt; &lt;listener-...

    ssh框架的搭建

    &lt;param-value&gt;/WEB-INF/log4j.properties&lt;/param-value&gt; &lt;/context-param&gt; &lt;!-- Listener contextConfigLocation --&gt; &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener...

    logback-ext-spring

    &lt;param-value&gt;/WEB-INF/conf/logback.xml&lt;/param-value&gt; &lt;/context-param&gt; &lt;listener-class&gt;ch.qos.logback.ext.spring.web.LogbackConfigListener&lt;/listener-class&gt; &lt;/listener&gt; 即可加载logback配置,使用...

    一个简单的Acegi入门实例

    &lt;!!-- web.xml文件 --&gt; &lt;?xml version="1.0" encoding="UTF-8"?...&lt;param-value&gt;/WEB-INF/acegi-config.xml&lt;/param-value&gt; &lt;/context-param&gt; &lt;!-- Acegi 的 Filter Chain 代理 --&gt; &lt;filter&gt; &lt;filter-name&gt;

    Web配置详解

    Web.xml常用元素&lt;web-app&gt;&lt;display-name&gt;&lt;/display-name&gt;定义了WEB应用的名字&lt;description&gt;&lt;/description&gt; 声明WEB应用的描述信息&lt;context-param&gt;&lt;/context-param&gt; context-param元素声明应用范围内的初始化参数。...

    基于java的企业级应用开发:Spring的核心容器.ppt

    Web服务器实例化ApplicationContext容器时,通常会使用ContextLoaderListener来实现,此种方式只需要在web.xml中添加如下代码: &lt;context-param&gt; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt; ...

    shiro资料一览

    一,添加struts2的支持 1.添加jar包 struts-2.3.4.1\apps\struts2-blank\WEB-INF\lib 2.添加配置文件 struts-2.3.4.1\apps\struts2-...3.在web.xml中添加context-param指定spring配置文件的位置,并通过监听器加载

    DOS命令使用方法(超全).

    &lt;param-value&gt;classpath*:applicationContext-*.xml&lt;/param-value&gt; &lt;/context-param&gt; &lt;!-- 这是spring 监听 --&gt; &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-...

    网站访问记录器 0.1.1 发布_程序

    数据库连接为在web.xml中的如下配置 项: &lt;context-param&gt; &lt;param-name&gt;WebVisitLogger-DbUrl&lt;/param-name&gt; &lt;param-value&gt;jdbc:postgresql://localhost/visit_logger?user=postgres&password=postgres&charSet...

    Spring MVC 框架应用实例

    &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt; /WEB-INF/database.xml /WEB-INF/applicationContext.xml &lt;/param-value&gt; &lt;/context-param&gt; &lt;listener-class&gt; org.spring...

    网站访问记录器 0.1.1 发布_数据库

    数据库连接为在web.xml中的如下配置 项: &lt;context-param&gt; &lt;param-name&gt;WebVisitLogger-DbUrl&lt;/param-name&gt; &lt;param-value&gt;jdbc:postgresql://localhost/visit_logger?user=postgres&password=postgres&charSet...

    web.xml中如何设置配置文件的加载路径实例详解

    web应用程序通过Tomcat等容器启动时,会首先加载web.xml文件,通常我们工程中的各种配置文件,如日志、数据库、spring的文件等都在此时被加载,下面是两种常用的配置文件加载路径,即配置文件可以放到 SRC目录下或者...

    springweb3.0MVC注解(附实例)

    &lt;param-value&gt;classpath:applicationContext.xml&lt;/param-value&gt; &lt;/context-param&gt; &lt;!-- Spring 容器启动监听器 --&gt; &lt;listener-class&gt; org.springframework.web.context.ContextLoaderListener &lt;/listener-...

    CXF WebService整合Spring示例工程代码demo

    &lt;param-value&gt;classpath*:applicationContext-server.xml&lt;/param-value&gt; &lt;/context-param&gt; &lt;listener-class&gt;org.springframework.web.util.IntrospectorCleanupListener&lt;/listener-class&gt; &lt;servlet-...

Global site tag (gtag.js) - Google Analytics