struts标签不显示

来源:互联网 发布:如何靠网络挣钱 编辑:程序博客网 时间:2024/05/16 09:48

这是报错

严重: Servlet.service() for servlet [jsp] in context with path [/2_用户登录界面] threw exception [An exception occurred processing JSP page /register.jsp at line 21212118:   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 causeThe 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 tag. - [unknown location]

原因在于Struts标签仅用于当请求通过servlet选择器,因为初始化struts标签需要servlet选择器
我把这些代码写在form表单提交后的一个网页中就可以用了
这里写图片描述
看来我必须用html标签了

0 0
原创粉丝点击