您的位置:首页 > 编程语言 > Java开发

struts标签不显示

2016-04-10 09:44 621 查看
这是报错

严重: Servlet.service() for servlet [jsp] in context with path [/2_用户登录界面] threw exception [An exception occurred processing JSP page /register.jsp at line 2121

2118:
2119:   <body data-genuitec="wc1-4-79">
2120:     This is my JSP page. <br data-genuitec="wc1-4-80">
2121:     <s:form action="" method="post">
2122:     <s:textfield name="username" label="用户名"></s:textfield>
2123:     <s:password name="password" label="密码"></s:password>
2124:     <s:textfield name="age" label="年龄"></s:textfield>

Stacktrace:] with root cause
The Struts dispatcher cannot be found.  This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this
4000
tag. - [unknown location]


原因在于Struts标签仅用于当请求通过servlet选择器,因为初始化struts标签需要servlet选择器

我把这些代码写在form表单提交后的一个网页中就可以用了



看来我必须用html标签了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: