NVelocity错误 Unable to find resource

简介: Unable to find resource ''XXXXX 说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

Unable to find resource ''XXXXX

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: NVelocity.Exception.ResourceNotFoundException: Unable to find resource 'XXXXt.htm'

源错误:

行 62:             VelocityContext velocityContext = new VelocityContext(modelTable); 
行 63: VelocityEngine velocityEngine = ctx.GetObject("VelocityEngine") as VelocityEngine;
行 64: string mergedTemplate = VelocityEngineUtils.MergeTemplateIntoString(velocityEngine, "PersonList.htm", Encoding.UTF8.WebName, modelTable);
行 65: string data=velocityEngine.GetTemplate("TemplatePage", Encoding.UTF8.WebName).Data.ToString();
行 66: Response.Write(data);

源文件: f:\XXXX\GerateHTML.aspx.cs    行: 64


 解决办法:把文件的生成操作改为“嵌入的资源”

 

 

 

版权

作者:灵动生活 郝宪玮

出处:http://www.cnblogs.com/ywqu

如果你认为此文章有用,请点击底端的【推荐】让其他人也了解此文章,

img_2c313bac282354945ea179a807d7e70d.jpg

本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

 

相关文章
|
3月前
|
机器学习/深度学习 Java Android开发
记录一个Flutter运行的异常FAILURE: Build failed with an exception. What went wrong: A problem occurred config
记录一个Flutter运行的异常FAILURE: Build failed with an exception. What went wrong: A problem occurred config
46 0
|
4月前
报错The above error occurred in the <InnerPicker> component:解决方法和Ant Design form表单setFieldValue修改input
报错The above error occurred in the <InnerPicker> component:解决方法和Ant Design form表单setFieldValue修改input
62 0
|
4月前
|
小程序 前端开发 PHP
laravel8(一)Target class [XXXXXController] does not exist.错误的解决办法
Laravel 8配置好路由后,访问提示: arduino 复制代码 Target class [XXXXXController] does not exist. 错误。 出现这个错误的原因是Laravel8对路由命名空间做出了更新(详见:路由命名空间更新),而我们仍然在使用Laravel6或者7版本的方式写路由。 Laravel 8路由配置方式: php 复制代码 use App\Http\Controllers\UserController; Route::get('/users', [UserController::class, 'index']); Laravel 6/7路由配置方
52 1
|
自然语言处理 Python
Resource punkt not found. Please use the NLTK Downloader to obtain the resource错误解决方案
Resource punkt not found. Please use the NLTK Downloader to obtain the resource错误解决方案
442 0
Resource punkt not found. Please use the NLTK Downloader to obtain the resource错误解决方案
|
11月前
|
开发者 iOS开发
Xcode运行报错The operation couldn’t be completed. Unable to launch xxx because it has an invalid code...
Xcode运行报错The operation couldn’t be completed. Unable to launch xxx because it has an invalid code...
640 0
|
Linux
解决办法:error: <item> inner element must either be a resource reference or empty.
解决办法:error: <item> inner element must either be a resource reference or empty.
210 0
No injector for custom defined data type的解决办法
No injector for custom defined data type的解决办法
224 0
No injector for custom defined data type的解决办法
ui5 resource file 404 error
Created by Jerry Wang, last modified on Nov 07, 2014
ui5 resource file 404 error
关于Unable to find a @SpringBootConfiguration错误解决方法
SpringBoot项目上跑测试类,加上@SpringBootTest运行报错,其中一种错误就是未加载到启动类,导致整个启动类挂了,详情看下方内容
387 0
关于Unable to find a @SpringBootConfiguration错误解决方法