异常详细信息: NVelocity.Runtime.Parser.ParseException: Encountered
"<EOF>" at line 21, column 2.
Was expecting one of:
"("
...
<RPAREN> ...
<ESCAPE_DIRECTIVE>
...
<SET_DIRECTIVE> ...
"\\\\" ...
"\\"
...
<TEXT> ...
<SINGLE_LINE_COMMENT> ...
"*#"
...
"*#" ...
<STRING_LITERAL> ...
<END>
...
"if" ...
"stop" ...
<NUMBER_LITERAL>
...
<WORD> ...
<IDENTIFIER> ...
<DOT>
...
"{" ...
"}" ...
堆栈跟踪:
[ParseException: Encountered "<EOF>" at line 21, column 2.
Was expecting one of:
"(" ...
<RPAREN> ...
<ESCAPE_DIRECTIVE> ...
<SET_DIRECTIVE> ...
"\\\\" ...
"\\" ...
<TEXT> ...
<SINGLE_LINE_COMMENT> ...
"*#" ...
"*#" ...
<STRING_LITERAL> ...
<END> ...
"if" ...
"stop" ...
<NUMBER_LITERAL> ...
<WORD> ...
<IDENTIFIER> ...
<DOT> ...
"{" ...
"}" ...
]
NVelocity.Runtime.Parser.Parser.Parse(TextReader reader, String templateName) +257
NVelocity.Runtime.RuntimeInstance.Parse(TextReader reader, String templateName, Boolean dumpNamespace) +321
NVelocity.Runtime.RuntimeInstance.Parse(TextReader reader, String templateName) +71
NVelocity.Template.Process() +249
[ParseErrorException: Encountered "<EOF>" at line 21, column 2.
Was expecting one of:
"(" ...
<RPAREN> ...
<ESCAPE_DIRECTIVE> ...
<SET_DIRECTIVE> ...
"\\\\" ...
"\\" ...
<TEXT> ...
<SINGLE_LINE_COMMENT> ...
"*#" ...
"*#" ...
<STRING_LITERAL> ...
<END> ...
"if" ...
"stop" ...
<NUMBER_LITERAL> ...
<WORD> ...
<IDENTIFIER> ...
<DOT> ...
"{" ...
"}" ...
]
NVelocity.Template.Process() +573
NVelocity.Runtime.Resource.ResourceManagerImpl.LoadResource(String resourceName, ResourceType resourceType, String encoding) +273
NVelocity.Runtime.Resource.ResourceManagerImpl.GetResource(String resourceName, ResourceType resourceType, String encoding) +414
NVelocity.Runtime.RuntimeInstance.GetTemplate(String name, String encoding) +81
NVelocity.Runtime.RuntimeInstance.GetTemplate(String name) +104
NVelocity.App.VelocityEngine.GetTemplate(String name) +71
HZ.PortalSystem.WebFile.StaticPage.SpecialSectionVM.Center1.TemplateProduct(List`1 infolist) in F:\Emed Project\源代码\门户网站\HZ.PortalSystem.WebFile\StaticPage\SpecialSectionVM\Center1.cs:74
HZ.PortalSystem.WebFile.AdminManage.InformationManage.SpecializedTopicsList.OperateCheckStatus(Int32 status) in F:\Emed Project\源代码\门户网站\HZ.PortalSystem.WebFile\AdminManage\InformationManage\Special\SpecializedTopicsList.aspx.cs:189
HZ.PortalSystem.WebFile.AdminManage.InformationManage.SpecializedTopicsList.btnCheckOK_Click(Object sender, EventArgs e) in F:\Emed Project\源代码\门户网站\HZ.PortalSystem.WebFile\AdminManage\InformationManage\Special\SpecializedTopicsList.aspx.cs:149
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
//VM文件代码
<div class="content-middle-1-title">
<span class="news1">主要新闻栏目一</span>
<a href="#" class="more">[更多]</a>
</div>
<div class="topic">
<h1>
<a href="#">$top1.SHORTTITLE</a>
</h1>
<p class="paragraph">
$top1.SUMMARY[<a href="#" target="_blank">详情</a>]
</p>
<h1>
<a href="#">$top2.SHORTTITLE</a>
</h1>
<p class="paragraph">
$top2.SUMMARY[<a href="#" target="_blank">详情</a>]
</p>
#foreach($row in $list)
<p>
<a href="#">
·[$row.INFOTYPE]$row.SHORTTITLE
</a>
</p>
</div>
肯定是哪里语法错误了 把你的VM文件贴出来看看吧
在吗 你这个问题解决了没?