Red5, java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
Red5, java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
我用 red5 (1.0.5) 编写了一些 flash 应用程序。但我决定有一个 servlet 来接收来自用户的音频文件(这次我不想使用 flash)。我注意到我无法打开任何 jsp。每次我尝试打开一个时,我都会收到以下 servlet 异常:javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ExpressionFactory。如果我重新加载页面,那么在尝试几次之后我会得到一些不同的东西: java.lang.ClassNotFoundException: org.apache.jsp.index_jsp 然后如果我再次重新加载,那么我提到的第一个异常再次显示。Project Explorer. 任何帮助表示赞赏。 :)
Servlet
package org.red5.core;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class Upload
*/
@WebServlet("/Upload")
public class Upload extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* Default constructor.
*/
public Upload() {
}
/**
* @see HttpServlet#doGet(HttpServletRequest request,HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.getWriter().append("Served at: ").append(request.getContextPath());
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
}
JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>JSP</title>
</head>
<body>
<h1>JSP!</h1>
</body>
</html>
异常
exception
javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:348)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.red5.logging.LoggerContextFilter.doFilter(LoggerContextFilter.java:77)
root cause
java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
org.apache.jasper.compiler.PageInfo.<init>(PageInfo.java:79)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:111)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.red5.logging.LoggerContextFilter.doFilter(LoggerContextFilter.java:77)
检查您的 red5/plugins 目录,您可能缺少 EL 实现 jar,通常命名为:tomcat-embed-el.jar
我用 red5 (1.0.5) 编写了一些 flash 应用程序。但我决定有一个 servlet 来接收来自用户的音频文件(这次我不想使用 flash)。我注意到我无法打开任何 jsp。每次我尝试打开一个时,我都会收到以下 servlet 异常:javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ExpressionFactory。如果我重新加载页面,那么在尝试几次之后我会得到一些不同的东西: java.lang.ClassNotFoundException: org.apache.jsp.index_jsp 然后如果我再次重新加载,那么我提到的第一个异常再次显示。Project Explorer. 任何帮助表示赞赏。 :)
Servlet
package org.red5.core;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class Upload
*/
@WebServlet("/Upload")
public class Upload extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* Default constructor.
*/
public Upload() {
}
/**
* @see HttpServlet#doGet(HttpServletRequest request,HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.getWriter().append("Served at: ").append(request.getContextPath());
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
}
JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>JSP</title>
</head>
<body>
<h1>JSP!</h1>
</body>
</html>
异常
exception
javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:348)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.red5.logging.LoggerContextFilter.doFilter(LoggerContextFilter.java:77)
root cause
java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
org.apache.jasper.compiler.PageInfo.<init>(PageInfo.java:79)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:111)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.red5.logging.LoggerContextFilter.doFilter(LoggerContextFilter.java:77)
检查您的 red5/plugins 目录,您可能缺少 EL 实现 jar,通常命名为:tomcat-embed-el.jar