JFinal Weixin扩展jsp需要的jar包

GoogleFan 发布于 2015/08/25 16:41
阅读 702
收藏 0

@JFinal :

   你好,我现在想在JFinal Weixin 框架上写一个jsp的Demo。一开始时候,有如下错误:

HTTP ERROR 500

Problem accessing /index/index.jsp. Reason:

    JSP support not configured
Powered by Jetty://


于是我在Pom.xml中添加了jetty-jsp的jar包

<dependency>
     <groupId>org.eclipse.jetty</groupId>
     <artifactId>jetty-jsp</artifactId>
     <version>9.3.0.M1</version>
</dependency>



现在页面可以出来了:

但是跳转 Blog管理时出错了:

下午 com.jfinal.core.ActionHandler error
严重: /blog
java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
	at org.apache.jasper.compiler.JspUtil.getExpressionFactory(JspUtil.java:1189)



我尝试添加le的jar包,但是没有解决。
<dependency>
	<groupId>javax.el</groupId>
	<artifactId>el-api</artifactId>
	<version>2.2</version>
</dependency>


想问你一下,就是在 JFinal Weixin如何添加jsp的demo还需要哪些jar包呢?

PS:我试过jfinal_demo_for_jsp,完全没有问题。

加载中
1
JFinal
JFinal

   jfinal demo for maven 中有这样的配置

<dependency><!-- jetty-server-8.1.8 开发时JSP 支持 -->
<groupId>org.eclipse.jetty.orbit</groupId>
	<artifactId>javax.servlet.jsp</artifactId>
	<version>2.2.0.v201112011158</version>
	<scope>provided</scope>
</dependency>
<dependency><!-- jetty-server-8.1.8 开发时JSP 支持 -->
	<groupId>org.eclipse.jetty.orbit</groupId>
	<artifactId>org.apache.jasper.glassfish</artifactId>
	<version>2.2.2.v201112011158</version>
	<scope>provided</scope>
	</dependency>
<dependency><!-- jetty-server-8.1.8 开发时JSP 支持 -->
	<groupId>org.eclipse.jetty.orbit</groupId>
	<artifactId>javax.el</artifactId>
	<version>2.2.0.v201108011116</version>
	<scope>provided</scope>
</dependency>
<dependency><!-- jetty-server-8.1.8 开发时JSP 支持 -->
	<groupId>org.eclipse.jetty.orbit</groupId>
	<artifactId>com.sun.el</artifactId>
	<version>2.2.0.v201108011116</version>
	<scope>provided</scope>
</dependency>
<dependency><!-- jetty-server-8.1.8 开发时JSP 支持 -->
	<groupId>org.eclipse.jetty.orbit</groupId>
	<artifactId>org.eclipse.jdt.core</artifactId>
	<version>3.7.1</version>
	<scope>provided</scope>
	</dependency>
<dependency><!-- JSTL 支持 -->
	<groupId>org.eclipse.jetty.orbit</groupId>
	<artifactId>javax.servlet.jsp.jstl</artifactId>
	<version>1.2.0.v201105211821</version>
	<exclusions><!-- 避免导出 servlet jar 包 -->
	    <exclusion>
	        <groupId>org.eclipse.jetty.orbit</groupId>
	        <artifactId>javax.servlet</artifactId>
	    </exclusion>
	</exclusions>
</dependency>
<dependency><!-- JSTL 支持 -->
	<groupId>org.eclipse.jetty.orbit</groupId>
	<artifactId>org.apache.taglibs.standard.glassfish</artifactId>
	<version>1.2.0.v201112081803</version>
	<exclusions><!-- 避免导出 servlet jar 包 -->
	    <exclusion>
	        <groupId>org.eclipse.jetty.orbit</groupId>
	        <artifactId>javax.servlet</artifactId>
	    </exclusion>
	</exclusions>
</dependency>



GoogleFan
GoogleFan
回复 @JFinal : 原来是添加的jar包不对,应该添加 jstl就OK了 <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency>
JFinal
JFinal
以上是一个 dependency 拆分成了七个,是为了在导出 war 时可以无缝地迁移到 tomcat 之中
返回顶部
顶部