/**
*
*/
import java.io.File;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;
/**
* @author xiaojun
*
*/
public class Application {
public static int WebPort = 3280;
public static String WebRoot = (new File("")).getAbsolutePath() + "/WebRoot";
/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {
createServer().start();
}
protected static Server createServer() {
System.out.println("------Start Server...");
Server server = new Server(WebPort);
WebAppContext webContext = new WebAppContext(WebRoot, "/");
server.setHandler(webContext);
return server;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
由于以前写了个jetty内嵌的服务器,需要在其上面添加JSF的东西 试了好久,终于调通了,拿出来给大家分享一下 本demo是使用jetty内嵌的方式发布的jsf的demo 整个demo是工程整个打包,包含所有的jar包,包括使用的jetty9.1.1、JSF所使用的包,以及jsp发布所需。 各位初学这方面东西的朋友,拿到后,可以直接在eclipse中运行
资源推荐
资源详情
资源评论
收起资源包目录
jsf-jetty.zip (48个子文件)
jsf-jetty
.settings
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.jsdt.ui.superType.container 49B
.jsdtscope 658B
src
Application.java 713B
TestBean.java 604B
.project 573B
WebRoot
WEB-INF
web.xml 873B
classes
TestBean.class 1KB
Application.class 2KB
hello.xhtml 589B
index.jsp 874B
welcome.xhtml 526B
.classpath 3KB
lib
jsf
jsf-impl-2.1.7.jar 1.87MB
jsf-api-2.1.7.jar 619KB
jsp-api-6.0.37.jar 75KB
jstl-1.2.jar 405KB
commons-logging-1.1.jar 52KB
jsp
javax.servlet.jsp-2.3.2.jar 535KB
jetty-jsp-jdt-2.3.3.jar 13KB
javax.servlet.jsp.jstl-1.2.0.v201105211821.jar 51KB
org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar 419KB
javax.el-3.0.0.jar 219KB
org.eclipse.jdt.core-3.8.2.v20130121.jar 1.68MB
javax.servlet.jsp-api-2.3.1.jar 52KB
jetty
jetty-jaas-9.1.1.v20140108.jar 37KB
jetty-proxy-9.1.1.v20140108.jar 38KB
jetty-http-9.1.1.v20140108.jar 101KB
jetty-continuation-9.1.1.v20140108.jar 16KB
jetty-security-9.1.1.v20140108.jar 94KB
jetty-annotations-9.1.1.v20140108.jar 77KB
jetty-deploy-9.1.1.v20140108.jar 49KB
jetty-servlet-9.1.1.v20140108.jar 108KB
jetty-client-9.1.1.v20140108.jar 204KB
jetty-jndi-9.1.1.v20140108.jar 40KB
servlet-api-3.1.jar 94KB
jetty-plus-9.1.1.v20140108.jar 51KB
jetty-servlets-9.1.1.v20140108.jar 116KB
jetty-rewrite-9.1.1.v20140108.jar 28KB
jetty-webapp-9.1.1.v20140108.jar 109KB
jetty-xml-9.1.1.v20140108.jar 41KB
jetty-util-9.1.1.v20140108.jar 326KB
jetty-jmx-9.1.1.v20140108.jar 22KB
jetty-jaspi-9.1.1.v20140108.jar 37KB
jetty-server-9.1.1.v20140108.jar 390KB
jetty-io-9.1.1.v20140108.jar 98KB
jetty-schemas-3.1.jar 184KB
servlet.jar 76KB
共 48 条
- 1
资源评论
- suiyujieliuye2015-02-12我只看了jetty那块。。
- qq_230459932014-11-28jsf非常小。刚开始学习可以看看。
- cRaZy-ToKeIo2014-04-17很简洁的项目,可以学习一下使用jetty。
- lewee02152015-06-30不错不错,有jetty的好处就是不用另外部署服务器
- gaoyan03352014-10-14jsf 控件显示不出来
究天人之际
- 粉丝: 84
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功