运行环境 java 6,eclipse juno,ssh(spring,hibernate,springmvc )

1、离线安装

下载地址:http://pan.baidu.com/s/1qX67wOc,下载后,解压,把features和plugins拷贝到eclipse安装目录的plugins下,重启eclipse。

2、在线安装(我用的这种)

help--> install new software... -->

 地址:http://run-jetty-run.googlecode.com/svn/trunk/updatesite

(我的ping不到,我用的是这个地址  http://eclipse-jetty.github.io/update/  )

安装完成,重启eclipse。

 

开始配置.      

进入Run---> Debug Configurations... --->

新建一个Jetty Webapp (如下图)

然后在Options页签勾选Enable JNDI Support。

最后在WEB-INF 目录下新建jetty-env.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<!-- 应用数据源 -->
<New id="test" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg>jdbc/test-local</Arg> <!--这个要和数据源里面的对应-->
<Arg>
<New class="org.apache.commons.dbcp.BasicDataSource">
<Set name="driverClassName">oracle.jdbc.driver.OracleDriver</Set>
<Set name="url">jdbc:oracle:thin:@ ip:1521:orcl</Set>
<Set name="username">username</Set>
<Set name="password">password</Set>
<Set name="maxActive">500</Set>
<Set name="maxIdle">30</Set>
<Set name="maxWait">10000</Set>
</New>
</Arg>
</New>
</Configure>

数据源我是这么配置的

    <bean id="dataSourceLocal" name="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jdbc/test-local"/>
<property name="resourceRef" value="true" />
</bean>

最后以jetty 运行。

启动成功!

eclipse内嵌jetty(run-jetty-run插件) 配置jndi数据源的更多相关文章

  1. Eclipse内嵌的webservice客户端

    概述 Eclipse内嵌的webservice客户端,可用于发起请求,查看结果,展示请求和响应的报文. 详情 在Java EE视图,可以看到内嵌的webservice客户端浏览器登陆按钮 点击打开浏览 ...

  2. 012.Delphi插件之QPlugins,多实例内嵌窗口服务

    这个DEMO中主要是在DLL中建立了一个IDockableControl类,并在DLL的子类中写了具体的实现方法. 在主程序exe中,找到这个服务,然后调用DLL的内嵌方法,把DLL插件窗口内嵌到主程 ...

  3. Spring Boot 揭秘与实战(五) 服务器篇 - 其他内嵌服务器 发表于 2017-01-03 | Spring框架 | Spri

    文章目录 1. Jetty 的切换 2. Undertow的使用 Spring Boot 可选择内嵌 Tomcat.Jetty 和 Undertow,因此我们不需要以 war 包形式部署项目.< ...

  4. 【Spring Boot】内嵌容器

    Spring Boot内嵌容器支持Tomcat.Jetty.Undertow. tomcat容器 spring boot 的web应用开发必须使用spring-boot-starter-web,其默认 ...

  5. (转)利用eclipse external tool 执行mvn jetty:run

    一.如果这个工程是标准的maven-webapp那么基本上不用修改,直接运行jetty:run就可以执行. 但是有时候会报错说 [ERROR] No plugin found for prefix ' ...

  6. 使用jetty作为内嵌服务器启动项目

    http://blog.csdn.net/robinpipi/article/details/7557035 需求:把jetty作为内嵌的一个服务器,直接启动,web项目不用部署在应用服务器中.在网上 ...

  7. Message高级特性 & 内嵌Jetty实现文件服务器

    1. Messaage Properties  常见属性 更多的属性以及介绍参考:http://activemq.apache.org/activemq-message-properties.html ...

  8. IDEA内嵌Jetty启动SpringMvc项目

    这段时间本意是想要研究一下Netty的多线程异步NIO通讯框架,看完原理想要做下源码分析.查找资料发现Jetty框架底层支持用Netty做web请求的多线程分发处理,于是就筹备着将Jetty框架内嵌到 ...

  9. Spring Boot 内嵌容器 Tomcat / Undertow / Jetty 优雅停机实现

    Spring Boot 内嵌容器 Tomcat / Undertow / Jetty 优雅停机实现 Anoyi 精讲JAVA 精讲JAVA 微信号 toooooooozi 功能介绍 讲解java深层次 ...

随机推荐

  1. JSBinding / Plugins & Build Mozjswrap Library

    There are 2 libraries in Plugins: mozjs-31. This is SpiderMonkey library, built from https://github. ...

  2. oracle数据库备份和还原

    ip导出方式:exp  demo/demo@127.0.0.1:1521/orcl file=f:\f.dmp full=y 备份:exp demo/demo@orcl file=f:\f.dmp f ...

  3. C(C++)输入输出格式

    c&c++输入输出控制格式 许多情况下,都需要控制输出结果的表现形式.如输出宽度.输出精度.输出格式等.C++的iomanip.h中定义了许多控制符,这些控制符可以直接插入到流中,控制数据的输 ...

  4. save_data

    <?php /** * * $model 实例化表模型 * * $url 跳转地址 */ public function save_data($model,$url){ if(false === ...

  5. python统计元素重复次数

    python统计元素重复次数 # !/usr/bin/python3.4 # -*- coding: utf-8 -*- from collections import Counter arr = [ ...

  6. LeetCode----Tree

    Path Sum II 思路:回溯 public List<List<Integer>> pathSum(TreeNode root, int sum) { List<L ...

  7. VSFTP安装

    1. 先用rpm -qa| grep vsftpd命令检查是否已经安装,如果ftp没有安装, 使用yum? -y? install vsftpd 安装,(ubuntu 下使用apt-get insta ...

  8. GPU硬件加速相关

    从android3.0开始,2D渲染开始支持硬件加速,即在view的Canvas上的绘图操作可以用GPU来加速. 硬件加速会使app消耗更多的内存. 如果配置文件中,Target API level  ...

  9. SqlBulkCopy

    private static void DataTableToSQLServer( DataTable dt) { string connectionString = GetConnectionStr ...

  10. OAF_开发系列06_实现OAF属性集的介绍和开发Attribute Set(案例)

    20150705 Created By BaoXinjian