当前位置: 代码迷 >> Java Web开发 >> SSH有关问题,There is no Action 地图ped for action name null
  详细解决方案

SSH有关问题,There is no Action 地图ped for action name null

热度:5645   发布时间:2013-02-25 21:08:13.0
SSH问题,There is no Action mapped for action name null.
index.jsp页面如下:

   <div align="center" style="border-style: groove">
     <form action="login" id="login" method="post"  onsubmit="return isNull();">
     <strong>姓&nbsp;&nbsp;&nbsp;&nbsp;名:</strong>
     <input type="text" name="user.name" class="tablestyle" id="user.name"  style="width:200px"><br>
    <strong>密&nbsp;&nbsp;&nbsp;&nbsp;码:</strong>
     <input type="password" name="user.password" class="tablestyle" id="user.password"  style="width:200px"><br>
       <input type="submit", name ="login" value="登录" class="onmouseout"
       onmouseover="this.className='onmouseover'"
       onmouseout="this.className='onmouseout'">    
         
      <a href="<%=path %>">找回密码</a>
      <a href="<%=path %>/reg.jsp">注册</a>
     </form>
    </div>

web.xml如下:

 <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  
  <servlet>
   <servlet-name>UpLoadPic</servlet-name>
   <servlet-class>com.poscard.Util.UpLoadPic</servlet-class>
  </servlet>
  <servlet-mapping>
   <servlet-name>UpLoadPic</servlet-name>
   <url-pattern>/UpLoadPic1</url-pattern>
  </servlet-mapping>
  
  <filter>
      <filter-name>struts2</filter-name>
      <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
  </filter>
  <filter-mapping>
   <filter-name>struts2</filter-name>
   <url-pattern>/*</url-pattern>
  </filter-mapping>



   
  <!-- spring -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:/beans.xml
</param-value>
</context-param>


现在的问题是,当我点击注册超链接时,会跳转到reg.jsp。但是后台报错:

[http-8099-1] WARN  org.apache.struts2.dispatcher.Dispatcher  - Could not find action or result
There is no Action mapped for action name null. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)
  相关解决方案