[昨日调试] org.apache.jasper.JasperException: Unable to load class for JSP

在MATLAB和Simulink中设计并仿真一个智能建筑能效优化系统 智能建筑能效优化是现代建筑管理的重要组成部分,旨在通过智能化手段降低能源消耗、减少碳排放并提高居住舒适性。通过Simulink进行智能建筑能效优化仿真,可以验证控制策略的有效性、优化系统设计并降低开发成本。以下是如何在MATLAB和Simulink中设计并仿真一个智能建筑能效优化系统的详细步骤。通过上述步骤,我们成功设计并实现了基于Simulink的智能建筑能效优化仿真。该系统能够模拟复杂的建筑环境,验证能效优化策略的有效性,并通过优化设计提高建筑的能源利用效率和居住舒适性。 阅读详情

本文碰到的错误问题,其产生原因非常的简单,在大概看完背景之后,将先给出。

错误的详细信息在文章末尾附上。

 

背景:

因为需要更新某业务的原因,整理调试了由三方公司开发的一个用于前置对接功能的web应用。

虽然其使用的spring等版本非常的老旧(是的,有些系统竟然还在用spring2时代的东西,真真汗……),但由于提供了某个业务版本的源代码,作为整个业务中间节点的我,想了解整个流程,显然是将前置跑起来更直观。因此,我还是尝试在当前的环境内将其运行起来。

在各种折腾修改将其在idea内通过maven编译并建立配置运行后,由浏览器访问web应用时(如http://localhost:9090/projname/index.jsp),发生了本文标题里描述的错误。

这里先将出错的原因说明如下:

对于很老的系统,首先应该考虑jdk、tomcat等基本环境的版本问题,本文遇到的错误就是此web应用只能在tomcat5.5内运行。

 

 

关于类似的报错问题,搜索到一些其他可能原因的文章,摘附如下:

http://blog.youkuaiyun.com/gaofenglxx/article/details/52234681

https://stackoverflow.com/questions/4501829/unable-to-load-class-for-jsp

 

附:完整的报错内容

HTTP Status 500 - Unable to load class for JSP

 

--------------------------------------------------------------------------------

 

type Exception report

 

message Unable to load class for JSP

 

description The server encountered an internal error that prevented it from fulfilling this request.

 

exception

 

org.apache.jasper.JasperException: Unable to load class for JSP

         org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:630)

         org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:149)

         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:340)

         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)

         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)

         javax.servlet.http.HttpServlet.service(HttpServlet.java:723)

         com. xxxx.xxx.xxx.util.EncodingFilter.doFilter(EncodingFilter.java:28)

 

root cause

 

java.lang.ClassNotFoundException: org.apache.jsp.index_jsp

         java.net.URLClassLoader$1.run(URLClassLoader.java:202)

         java.security.AccessController.doPrivileged(Native Method)

         java.net.URLClassLoader.findClass(URLClassLoader.java:190)

         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)

         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)

         org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:628)

         org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:149)

         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:340)

         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)

         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)

         javax.servlet.http.HttpServlet.service(HttpServlet.java:723)

         com.xxxx.xxx.xxx.util.EncodingFilter.doFilter(EncodingFilter.java:28)

 

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.45 logs.

 

解锁VS2022!手把手教你本地部署Deepseek 在 VS2022 中本地部署 Deepseek,我们首先需要确保硬件资源的充足,如高性能的 GPU、大容量内存和高速存储等,这是模型稳定运行的基石。如果生成的摘要能够准确概括原文的核心内容,就表明 Deepseek 模型在文本分析方面的功能正常,部署稳定可靠。这对于开发者来说,能够大大提高开发效率,当遇到一些常见的功能实现时,可以借助 Deepseek 模型快速生成基础代码框架,减少手动编写的工作量。在大语言模型的蓬勃发展的当下,Deepseek 凭借其卓越的性能和创新的技术,已然成为该领域的佼佼者。 阅读详情

相关推荐

IMU自动校准论文与代码实现A Robust and Easy to Implement Method for IMU Calibration without External Equipments

PART1 摘要 低成本的惯性测量单元会受到系统误差的影响,系统误差由标度因子和轴偏差造成,这会降低位置和姿态估计的精度。 本文提出了一种无需任何外部设备的,鲁棒性强,易于实现的IMU校准方法。 该程序基于多放置方案,再估计传感器偏差的同时,为加速度和陀螺仪三轴的尺度和偏差系数。我们的方法只需要用手移动传感器,并将其放置在一组不同的静态位置(姿态)。 论文描述了一个鲁棒的快速校准协议,...

qq_29313679的博客 5308

Unable to load class for JSP

<br />Tomcat运行一段时间后出现 <br />org.apache.jasper.JasperException: <br />org.apache.jasper.JasperException: Unable to load class for JSP <br /><br />此错误并不是必现的,但是程序运行一段时间后偶尔就会出现,每次都要重启tomcat

joecheungdishuiya的专栏 872

别只盯着Spectre!Cadence Virtuoso里APS和Spectre X该怎么选?一份给模拟IC新手的指南

本文深入解析Cadence Virtuoso中的三大仿真引擎Spectre、APS和Spectre X,帮助模拟IC新手根据电路规模、精度需求和计算资源做出智能选择。通过对比技术指标和应用场景,提供射频电路、混合信号系统和电源管理IC的优化仿真策略,显著提升设计效率。

weixin_26841743的博客 705

eclipse jdk设置 org.apache.jasper.JasperException: Unable to load class for JSP

有时项目由于jdk启动不起来,或者不是指定的jdk启动,或者报如下错误,则需要检查下面的配置常见报错包括:The specified JRE installation does not existThe type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .clas...

yfx000的专栏 5622

从ISCXTor2016到CICIDS2017:手把手教你下载和使用UNB的网络安全数据集

本文详细介绍了UNB大学发布的ISCXTor2016和CICIDS2017等网络安全数据集的下载与使用方法,特别适合加密流量识别和网络行为分析研究。文章提供了多种高效获取路径、文件结构解析及实战分析示例,帮助研究者快速上手这些真实场景捕获的精细标注数据集。

weixin_42524945的博客 632

Blender骨骼绑定实战:如何用IK控制器让角色动作更自然(附常见问题解决)

本文深入探讨了Blender中IK控制器的实战应用,旨在解决角色动作僵硬问题。通过对比IK与FK的核心差异,详细解析了IK链的构建、参数设置及极向目标的使用,并提供了控制器定制、IK/FK无缝切换等高级技巧,帮助动画师实现更自然、符合直觉的角色动画。

weixin_29243279的博客 438

解决 org.apache.jasper.JasperException: Unable to load class for JSP

运行时抛出异常关键语句如下:后台:严重: Servlet.service() for servlet default threw exceptionjava.lang.ClassNotFoundException: org.apache.jsp.listUser_jsp前台:org.apache.jasper.JasperExce

lokion的专栏 2761

深入了解 Google Gemini:主要功能是什么以及我们为什么要使用它?

Google Gemini开启AI新纪元,以其独特的多模式功能重塑技术未来。

KompasAI的博客 4066

JSP中使用JSTL无法加载jsp(Unable to load class for JSP)

HTTP Status 500 - org.apache.jasper.JasperException: Unable to load class for JSP The absolute uri: http://***/function cannot be resolved in either web.xml or the jar files deployed with this app...

颜值即正义 1215

Unity WebView 插件⭐️(十八)3D WebView 原生2D模式 — Native 2D Mode

Unity中的 浏览器插件:3D WebView,利用好该插件我们可以自己使用Unity打造出一个自定义的多样化浏览器。可以用于2D显示,也可以用于3D空间场景中使用,在PC端、手机端和VR设备等都可以有一个非常好的效果。一起来浏览器插件:3D WebView的专栏学习使用吧!

努力前行,总会成为自己心中的那道光 7640

SAP Fiori Launchpad 概述

SAP Fiori launchpad 是托管 SAP Fiori 应用程序的 shell,并为应用程序提供导航、个性化、嵌入式支持和应用程序配置等服务。SAP Fiori Launchpad 是移动和桌面设备上 SAP Fiori 应用程序的入口点。启动板显示带有图块的主页,其中可以显示实时状态指示器,例如打开的任务数量。每个图块代表用户可以启动的业务应用程序。这包括 SAP Business Suite 事务应用程序和 SAP Smart Business 分析应用程序。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 932

Unable to load class for JSP或者有class not found 等

有时候JSP页面报错,无法生成对应的class文件,但是无法报出错误在哪行,只能报出含有错误的文件。定位错误的方法是,把自己刚写的jsp代码或者觉得可能有错误的代码逐渐注释起来,再次刷新页面,直到页面正常为止。

shiyuehit的博客 2373

C#解析基恩士(KEYENCE)PLC数据:KV协议通信与实时监控实现

KV协议是基恩士PLC使用的一种专用通信协议,通常用于与上位机进行数据交换。KV协议通过RS-232C、RS-485、Ethernet等接口与上位机通信,支持多种数据类型的读写,包括但不限于位、字、双字、浮点数等。简洁易用:KV协议的通信格式简单,易于实现。支持多种数据类型:支持位数据、字数据、定长字符串等。高效实时性:能够提供较高的实时数据交换性能,适合实时监控应用。本文介绍了如何通过C#与基恩士KV系列PLC进行通信,实现数据的解析和实时监控功能。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 1806

jsp中无法使用java_java – 无法为JSP加载类

异常堆栈跟踪org.apache.jasper.JasperException: Unable to load class for JSPorg.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:599)org.apache.jasper.servlet.JspServletWrapper.getServlet(...

weixin_35794185的博客 526

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

JSP连接数据库中的org.apache.jasper. JasperException: Unable to compile class for JSP:问题解决

报错信息:Class.forName("com.mysql.jdbc.Driver");这里需要导入8.0.23的包。对应的test是能成功跑的。

youcaodian的博客 2441

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

org.apache.jasper.JasperException: Unable to load class for JSP

org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to load class for JSP org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:156) org.apache.jaspe

c1005351789的专栏 1449

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

tomcat报错Unable to load class for JSP

同一个项目,在有的系统下就正常, 有的系统下就报Unable to load class for JSP错误。   谁知道是什么原因?

长安紫薯的专栏 1295

unable to load class for jsp

检查JSP页面中的Java代码,看是否有错误。

shiyuehit的博客 1896

org.apache.jasper.JasperException: Unable to compile class for JSP:

标题 MyEclipse10+默认tomcat6.0+默认jdk1.6 项目场景:创建一个普通的web项目运行jsp时,报错500 问题描述: 不多bb,直接上代码 <%@ page language="java" import="java.util.*" import="java.io.*" pageEncoding="ISO-8859-1"%> <% int status = 0 ; byte b[] = new byte[1024]; FileInputStream in =

qq_44690965的博客 1万+

Maven因为tomcat版本问题报错org.apache.jasper.JasperException: Unable to compile class for JSP问题解决

Maven Web项目出现org.apache.jasper.JasperException: Unable to compile class for JSP错误解决 1. 问题描述   初学Maven,新建了一个基于Web骨架的Web项目,jar 包也导好了,作用域也设置正确了,Tomcat也正常运行了,可是就是说编译错误。   2. 问题原因   虽然我配置了Tomcat 9,但是我忘记了Maven用的是自带的Tomcat。Maven默认的Tomcat是6.0.29版本,而且问题

qq_33088807的博客 1346

springboot 打war包报错Unable to compile class for JSP

1,JDK版本不一致 2,Tomcat版本不一致

qq_43209531的博客 344
上一篇: sql实现在评分记录集中去掉最高、最低百分之N评分记录
下一篇: 如何在Thymeleaf中实现ajax请求url的可靠构造?[续]
smartcore
博客等级 码龄19年 30粉丝 47原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值