org.apache.jasper.JasperException: /stu_login.jsp(30,2) The s:form tag declares that it accepts dynamic attributes but does not implement the required interface
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:802)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
。。。。。
- HTML code
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%><% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";%><%@taglib uri="/struts-tags" prefix="s"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <base href="<%=basePath%>"> <title>My JSP 'stu_login.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> <s:form action="stu_login" method="post" namespace="/stu"> <s:textfield name="student.name" label="用户名" /> <s:textfield name="student.stu_no" label="密 码" /> <s:submit /> <s:reset /> </s:form> </body></html>
请求热心人给指点
昨天晚上还好好的,今天用就悲剧了,服务器也重启过了,myeclipse也重启过了
难道我s:form标签真的用错了吗???
------解决方案--------------------
<s:form action="stu_login" method="post" namespace="/stu">
namespace是干啥的?另外action 不加 / 吗?
------解决方案--------------------
测试的时候把其他不相关的项目CLOSE了 试试
还有你改过struts.properties文件了?
------解决方案--------------------
default.properties 说错了
------解决方案--------------------
强哥,对于你目前的各种代码,俺都没看出问题啊!!! 或许不是程序的事,是配置的事呢 ?
------解决方案--------------------
stu_login.jsp(30,2) The s:form tag declares that it accepts dynamic attributes but does not implement the required interface
翻译过来的大概意思就是 你的S:form标签声明了冰且能够接收动态的属性 但是没有实现一个必须得接口
namespace是命名空间 这个 你知道的
既然报的事JSP页面异常 就在这漫漫找把 LZ好运
------解决方案--------------------
<action name="index">
<result>/stu_login.jsp</result>
</action>
把class 跟 method属性 写完
------解决方案--------------------
org.apache.jasper.JasperException: /stu_login.jsp(30,2) The s:form tag declares that it accepts