报错处理:Expression parameters.formName is undefined on line xx, column xx in xx/xx/doubleselect.ft

在做hibernate和struts2的整合项目的过程中
写了一个有关doubleselect标签的Demo
出现了如下报错:

严重: Servlet.service() for servlet jsp threw exception

Expression parameters.formName is undefined on line 150, column 43 in template/simple/doubleselect.ftl.
The problematic instruction:
----------
==> ${parameters.formName} [on line 150, column 41 in template/simple/doubleselect.ftl]
 in include "/${parameters.templateDir}/simple/doubleselect.ftl" [on line 25, column 1 in template/xhtml/doubleselect.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression parameters.formName is undefined on line 150, column 43 in template/simple/doubleselect.ftl.

错误原因:本来就想写个简单的demo,在jsp中就只写了doubleselect,之后报了以上错误。

有一下几点需要注意:

  1. 需要在页面中用s:form标签将doubleselect包绕
  2. 注意要填写 s:form中的name值
  3. 注意form是struts中的<s:form>,普通的html<form>同样报错
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值