不知道为什么有些Struts很奇怪我原来的目的是显示一个下拉框,我就写了下面的代码:
<html:select property="selected">
<html:options name="xxxForm" property="values" labelProperty="labels"/>
</html:select> 结果运行后,提示:Cannot find bean under name org.apache.struts.taglib.html.BEAN
必须让我加一个from,那就加贝结果,我又增加了下面的代码:
<html:form method="post" > <html:select property="selected">
<html:options name="xxxForm" property="values" labelProperty="labels"/>
</html:select> </html:form>我以前项目中下面这样写没问题
<html:form method="post" > </html:form>
但是现在项目中
<html:form method="post" >
</html:form>
这样写就报错: According to the TLD attribute action is mandatory for tag form然后我加上了
<html:form method="post" action="">
</html:form>
又报错: Cannot retrieve mapping for action /然后我写
<html:form method="post" action="#">
</html:form>又报错:Cannot retrieve mapping for action /
非要我写一个存在的action才可以通过!这个action我根本用不上,我都是用js统一提交的,而且如果我只是想展示一个select还要写这么多无用的东西吗?
搞的我乱死了啊!别人放假我加班啊,还要跟struts这些无聊的东西斗争,哼哼74了!
<html:select property="selected">
<html:options name="xxxForm" property="values" labelProperty="labels"/>
</html:select> 结果运行后,提示:Cannot find bean under name org.apache.struts.taglib.html.BEAN
必须让我加一个from,那就加贝结果,我又增加了下面的代码:
<html:form method="post" > <html:select property="selected">
<html:options name="xxxForm" property="values" labelProperty="labels"/>
</html:select> </html:form>我以前项目中下面这样写没问题
<html:form method="post" > </html:form>
但是现在项目中
<html:form method="post" >
</html:form>
这样写就报错: According to the TLD attribute action is mandatory for tag form然后我加上了
<html:form method="post" action="">
</html:form>
又报错: Cannot retrieve mapping for action /然后我写
<html:form method="post" action="#">
</html:form>又报错:Cannot retrieve mapping for action /
非要我写一个存在的action才可以通过!这个action我根本用不上,我都是用js统一提交的,而且如果我只是想展示一个select还要写这么多无用的东西吗?
搞的我乱死了啊!别人放假我加班啊,还要跟struts这些无聊的东西斗争,哼哼74了!
就得配置表单BEAN啊
多用jstl.
No configuration found for the specified action: '#' in namespace: ''. Form action defaulting to 'action' attribute's literal value.就是没有相对就原action来匹配,但不是错误
可以试一下啊
别用struts标签了