struts标签不显示

这是报错

严重: 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 tag. - [unknown location]

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

你可能感兴趣的:(struts2,bug)