idea2014 如何配置jetty,用shirotestApplication 运行.jsp文件

pom.xml

配置jetty

<!-- jsp support by jetty --><dependency>
	<groupId>org.eclipse.jetty</groupId>
	<artifactId>jetty-jsp</artifactId>
	<version>8.1.8.v20121106</version>
	<scope>provided</scope></dependency

启动项

ShirotestApplication {
    main(String[] args) {
        JFinal.(, , );
    }
    启动shirotestApplication
    控制台输出
    E:\installsoft\java\jre8\jdk8\bin\java -javaagent:E:\installsoft\ideaIU-2017.2.win\lib\idea_rt.jar=63405:E:\installsoft\ideaIU-2017.2.win\bin -Dfile.encoding=UTF-8 -classpath E:\installsoft\java\jre8\jdk8\jre\lib\charsets.jar;E:\installsoft\java\jre8\jdk8\jre\lib\deploy.jar;E:\installsoft\java\jre8\jdk8\jre\lib\ext\access-bridge-64.jar;E:\installsoft\java\jre8\jdk8\jre\lib\ext\cldrdata.jar;E:\installsoft\java\jre8\jdk8\jre\lib\ext\dnsns.jar;E:\installsoft\java\jre8\jdk8\jre\lib\ext\jaccess.jar;E:\installsoft\java\jre8\jdk8\jre\lib\ext\jfxrt.jar;E:\installsoft\java\jre8\jdk8\jre\lib\ext\localedata.jar;E:\installsoft\java\jre8\jdk8\jre\lib\ext\nashorn.jar;E:\installsoft\java\jre8\jdk8\jre\lib\ext\sunec.jar;E:\installsoft\java\jre8\jdk8\jre\lib\ext\sunjce_provider.jar;E:\installsoft\java\jre8\jdk8\jre\lib\ext\sunmscapi.jar;E:\installsoft\java\jre8\jdk8\jre\lib\ext\sunpkcs11.jar;E:\installsoft\java\jre8\jdk8\jre\lib\ext\zipfs.jar;E:\installsoft\java\jre8\jdk8\jre\lib\javaws.jar;E:\installsoft\java\jre8\jdk8\jre\lib\jce.jar;E:\installsoft\java\jre8\jdk8\jre\lib\jfr.jar;E:\installsoft\java\jre8\jdk8\jre\lib\jfxswt.jar;E:\installsoft\java\jre8\jdk8\jre\lib\jsse.jar;E:\installsoft\java\jre8\jdk8\jre\lib\management-agent.jar;E:\installsoft\java\jre8\jdk8\jre\lib\plugin.jar;E:\installsoft\java\jre8\jdk8\jre\lib\resources.jar;E:\installsoft\java\jre8\jdk8\jre\lib\rt.jar;E:\installsoft\java\jre8\jdk8\jre\lib\javax.persistence.jar;E:\installsoft\ideaIU-2017.2.win\workspace\shiro学习\Shiro学习--与SpringMVC整合(数据库,Shiro注解和Shiro标签)\shirotest\target\classes;E:\ssh框架资料\jfinal-all\jfinal-3.4-all\jfinal-3.4-all\jfinal-3.4-bin-with-src.jar;E:\ssh框架资料\jfinal-all\jfinal-3.4-all\jfinal-3.4-all\jetty-server-8.1.8.jar;C:\Users\Administrator\.m2\repository\org\slf4j\slf4j-log4j12\1.7.21\slf4j-log4j12-1.7.21.jar;C:\Users\Administrator\.m2\repository\org\slf4j\slf4j-api\1.7.21\slf4j-api-1.7.21.jar;C:\Users\Administrator\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Users\Administrator\.m2\repository\org\bouncycastle\bcprov-jdk16\1.46\bcprov-jdk16-1.46.jar;C:\Users\Administrator\.m2\repository\com\google\code\gson\gson\2.6.2\gson-2.6.2.jar;C:\Users\Administrator\.m2\repository\org\json\json\20160810\json-20160810.jar;C:\Users\Administrator\.m2\repository\com\thoughtworks\xstream\xstream\1.4.9\xstream-1.4.9.jar;C:\Users\Administrator\.m2\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;C:\Users\Administrator\.m2\repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;C:\Users\Administrator\.m2\repository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar;C:\Users\Administrator\.m2\repository\org\apache\httpcomponents\httpclient\4.5.2\httpclient-4.5.2.jar;C:\Users\Administrator\.m2\repository\org\apache\httpcomponents\httpcore\4.4.4\httpcore-4.4.4.jar;C:\Users\Administrator\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\Administrator\.m2\repository\commons-codec\commons-codec\1.9\commons-codec-1.9.jar;C:\Users\Administrator\.m2\repository\org\apache\httpcomponents\httpmime\4.5.2\httpmime-4.5.2.jar;C:\Users\Administrator\.m2\repository\org\jsoup\jsoup\1.9.2\jsoup-1.9.2.jar;C:\Users\Administrator\.m2\repository\org\apache\shiro\shiro-core\1.2.4\shiro-core-1.2.4.jar;C:\Users\Administrator\.m2\repository\commons-beanutils\commons-beanutils\1.8.3\commons-beanutils-1.8.3.jar;C:\Users\Administrator\.m2\repository\org\apache\shiro\shiro-web\1.2.4\shiro-web-1.2.4.jar;C:\Users\Administrator\.m2\repository\org\apache\shiro\shiro-spring\1.2.4\shiro-spring-1.2.4.jar;C:\Users\Administrator\.m2\repository\net\coobird\thumbnailator\0.4.8\thumbnailator-0.4.8.jar;C:\Users\Administrator\.m2\repository\com\twelvemonkeys\imageio\imageio-jpeg\3.3\imageio-jpeg-3.3.jar;C:\Users\Administrator\.m2\repository\com\twelvemonkeys\imageio\imageio-core\3.3\imageio-core-3.3.jar;C:\Users\Administrator\.m2\repository\com\twelvemonkeys\imageio\imageio-metadata\3.3\imageio-metadata-3.3.jar;C:\Users\Administrator\.m2\repository\com\twelvemonkeys\common\common-lang\3.3\common-lang-3.3.jar;C:\Users\Administrator\.m2\repository\com\twelvemonkeys\common\common-io\3.3\common-io-3.3.jar;C:\Users\Administrator\.m2\repository\com\twelvemonkeys\common\common-image\3.3\common-image-3.3.jar;C:\Users\Administrator\.m2\repository\com\twelvemonkeys\imageio\imageio-tiff\3.3\imageio-tiff-3.3.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-aop\4.2.5.RELEASE\spring-aop-4.2.5.RELEASE.jar;C:\Users\Administrator\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-aspects\4.2.5.RELEASE\spring-aspects-4.2.5.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\aspectj\aspectjweaver\1.8.8\aspectjweaver-1.8.8.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-beans\4.2.5.RELEASE\spring-beans-4.2.5.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-context\4.2.5.RELEASE\spring-context-4.2.5.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-context-support\4.2.5.RELEASE\spring-context-support-4.2.5.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-core\4.2.5.RELEASE\spring-core-4.2.5.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-expression\4.2.5.RELEASE\spring-expression-4.2.5.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-orm\4.2.5.RELEASE\spring-orm-4.2.5.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-jdbc\4.2.5.RELEASE\spring-jdbc-4.2.5.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-tx\4.2.5.RELEASE\spring-tx-4.2.5.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-web\4.2.5.RELEASE\spring-web-4.2.5.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-webmvc\4.2.5.RELEASE\spring-webmvc-4.2.5.RELEASE.jar;C:\Users\Administrator\.m2\repository\commons-io\commons-io\2.5\commons-io-2.5.jar;C:\Users\Administrator\.m2\repository\commons-fileupload\commons-fileupload\1.3.1\commons-fileupload-1.3.1.jar;C:\Users\Administrator\.m2\repository\mysql\mysql-connector-java\5.1.39\mysql-connector-java-5.1.39.jar;C:\Users\Administrator\.m2\repository\com\mchange\c3p0\0.9.5.2\c3p0-0.9.5.2.jar;C:\Users\Administrator\.m2\repository\com\mchange\mchange-commons-java\0.2.11\mchange-commons-java-0.2.11.jar;C:\Users\Administrator\.m2\repository\org\mybatis\mybatis\3.4.0\mybatis-3.4.0.jar;C:\Users\Administrator\.m2\repository\org\mybatis\mybatis-spring\1.3.0\mybatis-spring-1.3.0.jar;C:\Users\Administrator\.m2\repository\jstl\jstl\1.2\jstl-1.2.jar;C:\Users\Administrator\.m2\repository\taglibs\standard\1.1.2\standard-1.1.2.jar;C:\Users\Administrator\.m2\repository\com\baomidou\mybatis-plus\2.3\mybatis-plus-2.3.jar;C:\Users\Administrator\.m2\repository\com\baomidou\mybatis-plus-support\2.3\mybatis-plus-support-2.3.jar;C:\Users\Administrator\.m2\repository\com\baomidou\mybatis-plus-core\2.3\mybatis-plus-core-2.3.jar;C:\Users\Administrator\.m2\repository\com\github\jsqlparser\jsqlparser\1.1\jsqlparser-1.1.jar;C:\Users\Administrator\.m2\repository\com\baomidou\mybatis-plus-generate\2.3\mybatis-plus-generate-2.3.jar;C:\Users\Administrator\.m2\repository\com\jeesite\beetl\2.7-SNAPSHOT\beetl-2.7-SNAPSHOT.jar;C:\Users\Administrator\.m2\repository\org\antlr\antlr4-runtime\4.6\antlr4-runtime-4.6.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\module\jackson-module-jaxb-annotations\2.8.10\jackson-module-jaxb-annotations-2.8.10.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.8.10\jackson-core-2.8.10.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.8.10\jackson-databind-2.8.10.jar;C:\Users\Administrator\.m2\repository\com\google\guava\guava\18.0\guava-18.0.jar;C:\Users\Administrator\.m2\repository\com\alibaba\druid\0.2.23\druid-0.2.23.jar;C:\Users\Administrator\.m2\repository\com\alibaba\fastjson\1.1.37\fastjson-1.1.37.jar com.cn.kcgl.ShirotestApplication
Starting JFinal 3.4
log4j:WARN No appenders could be found for logger (org.eclipse.jetty.util.log).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Starting web server on port: 8094
Starting Complete. Welcome To The JFinal World :)

用TOMCAT也可以运行index.jsp

image.png 

结果

image.png


想用jfinal自带的jetty-server-8.1.8 jar替换tomat -用application启动如何配置才能运行jsp文件

评论区

或是的话

2018-07-21 19:44

2014 不升级一下吗

lwcompany

2018-07-23 12:33

@或是的话 升级了也不好用

lwcompany

2018-07-27 21:27

me.setDevMode(true);
me.setViewType(ViewType.JSP);//设置渲染页面为jsp

热门反馈

扫码入社