struts.xml login.jsp配置

秦明峰 2012-08-14 10:04:20
警告: No configuration found for the specified action: 'LoginPerson' in namespace: '/xiaoming'. Form action defaulting to 'action' attribute's literal value.



struts.xml配置如下:

<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
<package name="main" namespace="/xiaoming" extends="struts-default" >

<action name="LoginPerson"
class="xiaomingdemo.LoginAction">
<result name="login">/login.jsp</result>
<result name="success">/welcome.jsp</result>
</action>
</package>
</struts>


login.jsp如下:
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="struts"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
<html>
<head>
<title>LOGINXIAOMING</title>
<struts:head theme="ajax" />
</head>
<body>
<struts:form action="LoginPerson" namespace="/xiaoming">
<struts:label value="登录系统"></struts:label>
<struts:textfield name="name" label="账号"></struts:textfield>
<struts:password name="password" label="密码" />
<struts:submit value="登陆"></struts:submit>

</struts:form>
</body>
</html>



求大神帮忙~~~~~~~~~~~~~~
...全文
36 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

5,655

社区成员

发帖
与我相关
我的任务
社区描述
Web开发应用服务器相关讨论专区
社区管理员
  • 应用服务器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧