问答详情
源自:4-10 关于input的代码演示-深入Struts2

为什么提示Unknow tag (s:fildererror)

<%@ page language="java" contentType="text/html; charset=UTF-8"

    pageEncoding="UTF-8"%>

<%@ taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Insert title here</title>

</head>

<body>

<form action="HelloAction" method="get">

用户名:<input type="text" name="name"/> <s:fildererror name="username" ></s:fildererror>

密码:<input type="password" name="psw" />

年龄:<input type="text" name="age" />

<input type="submit" value="提交">

</form>

</body>

</html>

提示:org.apache.jasper.JasperException: /login.jsp(12,37) No tag "fildererror" defined in tag library imported with prefix "s"

提问者:慕粉3613271 2016-07-13 21:13

个回答

  • 慕粉3613271
    2016-07-13 21:33:26

    我知道了,因为<s:fielderror>写成了<s:filderror>。老是犯一些小错误。