HTTP Status 404 - No result defined for action ...AdminAction and result adminlg 5
<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEstrutsPUBLIC"-//ApacheSoftwareFoundation...
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<package name="myshoppingweb" extends="struts-default" namespace="/">
<action name="user" class="com.qu.shopping.action.UserAction">
<result name="login" type="redirectAction">/product!findAll</result>
<result name="register">index.jsp</result>
<result name="error">/login.jsp</result>
</action>
<action name="type" class="com.qu.shopping.action.TypeAction">
<result name="querylist">/products.jsp</result>
</action>
<action name="order" class="com.qu.shopping.action.OrderAction">
<result name="getCartInfo">/orders.jsp</result>
<result name="saveCart">/ordsuccess.jsp</result>
</action>
</package>
<package name="myadmin" namespace="/" extends="struts-default">
<action name="admin" class="com.qu.shopping.action.AdminAction">
<result name="adminlg" >MYWEB_SHOPPING/about.html</result>
<result name="input">/adminpage/index.html</result>
<result name="lgfail">/adminpage/icon.html</result>
<result name="regis">/adminpage/singup.html</result>
<result name="rgfail">/adminpage/singup.html</result>
</action>
</package>
</struts>
public String login(){
System.out.println("进入管理员登录action");
if(adminBiz.login(admin)!=null){
System.out.println(" 管理员登录成功");
ServletActionContext.getRequest().getSession().setAttribute("admin", admin);
return "adminlg";
}
System.out.println(" 管理员登录失败");
return "lgfail";
}
HTTP Status 404 - No result defined for action com.qu.shopping.action.AdminAction and result adminlg
这个错怎么解决不了呢? 管理员登录 验证通过了 ,可是为什么 ,页面报这个错? 展开
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<package name="myshoppingweb" extends="struts-default" namespace="/">
<action name="user" class="com.qu.shopping.action.UserAction">
<result name="login" type="redirectAction">/product!findAll</result>
<result name="register">index.jsp</result>
<result name="error">/login.jsp</result>
</action>
<action name="type" class="com.qu.shopping.action.TypeAction">
<result name="querylist">/products.jsp</result>
</action>
<action name="order" class="com.qu.shopping.action.OrderAction">
<result name="getCartInfo">/orders.jsp</result>
<result name="saveCart">/ordsuccess.jsp</result>
</action>
</package>
<package name="myadmin" namespace="/" extends="struts-default">
<action name="admin" class="com.qu.shopping.action.AdminAction">
<result name="adminlg" >MYWEB_SHOPPING/about.html</result>
<result name="input">/adminpage/index.html</result>
<result name="lgfail">/adminpage/icon.html</result>
<result name="regis">/adminpage/singup.html</result>
<result name="rgfail">/adminpage/singup.html</result>
</action>
</package>
</struts>
public String login(){
System.out.println("进入管理员登录action");
if(adminBiz.login(admin)!=null){
System.out.println(" 管理员登录成功");
ServletActionContext.getRequest().getSession().setAttribute("admin", admin);
return "adminlg";
}
System.out.println(" 管理员登录失败");
return "lgfail";
}
HTTP Status 404 - No result defined for action com.qu.shopping.action.AdminAction and result adminlg
这个错怎么解决不了呢? 管理员登录 验证通过了 ,可是为什么 ,页面报这个错? 展开
2个回答
2014-04-15
展开全部
<action name="admin" class="com.qu.shopping.action.AdminAction">应该有一个method的方法的要不然怎么调用AdminAction类中的方法。试试:<action name="admin" class="com.qu.shopping.action.AdminAction" method="adminlg ">
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
Storm代理
2023-08-29 广告
2023-08-29 广告
"StormProxies是全球大数据IP资源服务商,其住宅代理网络由真实的家庭住宅IP组成,可为企业或个人提供满足各种场景的代理产品。点击免费测试(注册即送1G流量)StormProxies有哪些优势?1、IP+端口提取形式,不限带宽,I...
点击进入详情页
本回答由Storm代理提供
2014-04-03
展开全部
action中,定义叫 admin
追问
什么意思?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询