Struts2项目中关于Struts标签的相关问题

来源:互联网 发布:黑沙女武神捏脸数据 编辑:程序博客网 时间:2024/06/05 09:26


Struts2项目中出现以下警告:虽然不影响程序得的运行,但看着很纠结~

警告: No configuration found for the specified action: '/admin_login' in namespace: ''. Form action defaulting to 'action' attribute's literal value.

2016-11-30 9:39:23 org.apache.struts2.components.ServletUrlRenderer warn

警告: No configuration found for the specified action: '/admin_login' in namespace: ''. Form action defaulting to 'action' attribute's literal value.



原因分析:login.jspz中的Struts标签
  <s:form action="/admin_login" method="post" theme="simple" >
  <table border="1" align="center" cellpadding="5" cellspacing="0">
 

中的nanamespace=""默认为空  需修改如下

<s:form action="admin_login" method="post" theme="simple" namespace="/" >
  <table border="1" align="center" cellpadding="5" cellspacing="0">

action中的“/”  得去掉,问题就解决了。


更多详解请点击:点击打开链接

0 0
原创粉丝点击