读书人

struts标签lable属性无法显示,该怎么解

发布时间: 2012-04-14 17:14:21 作者: rapoo

struts标签lable属性无法显示
jsp代码:

Java code
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%><%@ taglib prefix="s" uri="/struts-tags" %><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>  <head>    <base href="<%=basePath%>">        <title>My JSP 'login2.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="login">       <s:textfield name="username" lable="用户名"></s:textfield>       <s:password name="password" lable="密码"></s:password>       <s:submit lable="提交"></s:submit>   </s:form>  </body></html>

html里的代码
HTML code
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>  <head>    <base href="http://localhost:80/struts2/">        <title>My JSP 'login2.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>   <form id="login" name="login" action="/struts2/login.action" method="post"><table class="wwFormTable">       <tr>    <td class="tdLabel"></td>    <td><input type="text" name="username" value="" id="login_username" lable="用户名"/></td></tr>        <tr>    <td class="tdLabel"></td>    <td><input type="password" name="password" id="login_password" lable="密码"/></td></tr>        <tr>    <td colspan="2"><div align="right"><input type="submit" id="login_0" value="Submit" lable="提交"/></div></td></tr>    </table></form>      </body></html>

里面没标签显示

[解决办法]
你是想写label吧。。。

读书人网 >Java Web开发

热点推荐