jetty使用教程(嵌入eclipse开发)
2014-07-11 11:57
363 查看
在eclipse下面建一个java project
View Code
![](http://images.cnitblog.com/i/302729/201407/111155237707031.png)
运行这个类相当于启动了整个工程:
访问index.jsp
http://localhost:8080/testContext/index.jsp
![](http://images.cnitblog.com/i/302729/201407/111155567078134.png)
访问HelloWorldServlet:
http://localhost:8080/testContext/servlet/HelloWorldServlet
package org.jetty.demo; //启动类,入口 public class JettyServerStart { public static void main(String[] args) { JettyCustomServer server = new JettyCustomServer( "./jetty/etc/jetty.xml", "/testContext"); server.startServer(); } }
View Code
![](http://images.cnitblog.com/i/302729/201407/111155237707031.png)
运行这个类相当于启动了整个工程:
访问index.jsp
http://localhost:8080/testContext/index.jsp
![](http://images.cnitblog.com/i/302729/201407/111155567078134.png)
访问HelloWorldServlet:
http://localhost:8080/testContext/servlet/HelloWorldServlet
![](http://images.cnitblog.com/i/302729/201407/111156346292849.png)
相关文章推荐
- jetty使用教程(嵌入eclipse开发)
- jetty使用教程(嵌入eclipse开发)
- 使用Eclipse+Maven+Jetty构建Java Web开发环境(几个教程综合集成2014发行)
- 使用Eclipse配置android开发环境教程
- Python在Eclipse下的的开发插件PyDev使用教程
- 基于Eclipse的Android开发环境搭建及初步使用教程
- 使用Eclipse开发Sencha Touch框架教程
- 【教程】在Eclipse中使用PyDev进行Python开发
- eclipse下载,使用教程,开发Java——适合Java初学者
- eclipse 使用 jetty 开发web的集成方法
- 使用Eclipse开发Sencha Touch框架教程
- 在eclipse中使用jetty插件替代m2e开发调试maven web项目
- 基于Eclipse的TI集成开发环境IDE-CCSv5使用教程
- Jetty使用教程(四:23)—Jetty开发指南
- Jetty使用教程(四:24-27)—Jetty开发指南
- Android基础入门教程——1.2.1 使用Eclipse + ADT + SDK开发Android APP
- 【入门教程】使用Eclipse搭建C/C++开发环境
- 使用Eclipse插件EGit进行Git代码托管和协同开发教程
- 【教程】在Eclipse中使用PyDev进行Python开发
- 基于Eclipse的TI集成开发环境IDE-CCSv5使用教程