action和main.jsp定义如下,在访问jsp页面时出错如下:org.apache.jasper.JasperException: /user/main.jsp(26,13) According to TLD or attribute directive in tag file, attribute value does not accept any expressions求高手解决!!!public class UserAction extends Action { @Override
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
UserForm userForm = (UserForm)form;
List list = new ArrayList();
User user = new User();
user.setId(1);
user.setName(userForm.getUsername());
user.setBirthday(new Date());
list.add(user);
request.setAttribute("list", list);
return mapping.findForward("main");
}}main页面内容如下:
<body>
<table>
<logic:notEmpty name="list">
<logic:iterate name="list" id="user">
<tr>
<td> <c:out value="${user.id }"/></td>
<td> <c:out value="${user.name }"/></td>
<td> <c:out value="${user.birthday }"/></td>
</tr>
</logic:iterate>
</logic:notEmpty>
</table>
</body>
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
UserForm userForm = (UserForm)form;
List list = new ArrayList();
User user = new User();
user.setId(1);
user.setName(userForm.getUsername());
user.setBirthday(new Date());
list.add(user);
request.setAttribute("list", list);
return mapping.findForward("main");
}}main页面内容如下:
<body>
<table>
<logic:notEmpty name="list">
<logic:iterate name="list" id="user">
<tr>
<td> <c:out value="${user.id }"/></td>
<td> <c:out value="${user.name }"/></td>
<td> <c:out value="${user.birthday }"/></td>
</tr>
</logic:iterate>
</logic:notEmpty>
</table>
</body>
解决方案 »
- 用SSH框架写一个网站出现status 500错误!小弟新手,希望大家指教!
- 新手求高手推荐jsp入门的图书~~~
- 大家平时都用什么办法解决表单重复提交的刷新问题
- JavaBean调用dll问题
- 为什么有这么多关于ria,bs,cs的争论,applet不能解决吗?
- 新手一个很简单的jsp页面的问题!(怎么让选择框内容不刷新!)
- hThe web application [/jpkc] registered the JDBC driver [com.microsoft.sqlserver
- 十万火急!!不救我服务器要跨了!!!!
- Sybase12.5的JConn2.jar如何使用?
- 关于MyEclipse与Tomcat的一些问题
- 求助:数据库异常错误[SQLServer 2000 Driver for JDBC]Invalid operation for the current cursor
- 进入页面的时后就加载SERVLET怎么实现?
从第一行开始