1

Struts 问题报告

Struts has detected an unhandled exception:

Messages:   
There is no Action mapped for namespace [/advisers] and action name [/BursaLinkWeb/advisers/editAdvisorProfile.actionactionValue1zoneValeditAAZone] associated with context path [/BursaLinkWeb].
Stacktraces

There is no Action mapped for namespace [/advisers] and action name [/BursaLinkWeb/advisers/editAdvisorProfile.actionactionValue1zoneValeditAAZone] associated with context path [/BursaLinkWeb]. - [unknown location]
    com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
    org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
    org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
    com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
    org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:553)
    org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
    com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
    com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:85)
    org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
    com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
    com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:85)
    org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
    com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
    com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:85)
    com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:940)
    com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1037)
    com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4239)
    com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:302)
    com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.handleRequest(DynamicVirtualHost.java:317)
    com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1006)
    com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:274)
    com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:529)
    com.ibm.ws.threading.internal.Worker.executeWork(Worker.java:398)
    com.ibm.ws.threading.internal.Worker.run(Worker.java:380)
    java.lang.Thread.run(Thread.java:722)

You are seeing this page because development mode is enabled. Development mode, or devMode, enables extra debugging behaviors and reports to assist developers. To disable this mode, set:

  struts.devMode=false
in your WEB-INF/classes/struts.properties file.

s:a 链接有效,但 s:submit 生成了此异常。

这是代码:

`<s:url action="editAdvisorProfile" var="editAdvisorProfileUrl" escapeAmp="false" includeParams="get">
<s:param name="actionValue"><%=String.valueOf(Globals.ACTION_ADD)%></s:param>
<s:param name="zoneVal">editAAZone</s:param>
</s:url>
<s:a action="%{#editAdvisorProfileUrl}">Add New</s:a>
<s:submit align="center" action="%{#editAdvisorProfileUrl}" value="Add New"/>`

这是struts xml

<package name="advisorProfiles" extends="struts-default" namespace="/advisers">
    <action name="advisorProfile" method="execute" class="com.ob.bursalink.advisorProfile.action.ListAdvisorProfileAction">
        <result name="success">/bursa/advisorProfile/content/listAdvisorProfile_content.jsp</result>
        <result name="input">/bursa/advisorProfile/content/listAdvisorProfile_content.jsp</result>
    </action> 
    <action name="editAdvisorProfile" method="execute" class="com.ob.bursalink.advisorProfile.action.ListAdvisorProfileAction">
        <result name="success">/bursa/advisorProfile/content/listAdvisorProfile_content.jsp</result>
        <result name="input">/bursa/advisorProfile/content/listAdvisorProfile_content.jsp</result>
    </action>
    <action name="saveAdvisorProfile" method="save" class="com.ob.bursalink.advisorProfile.action.ListAdvisorProfileAction">
        <result name="success" type="redirect">advisorProfile</result>
    </action>
    <action name="deleteAdvisorProfile" method="delete" class="com.ob.bursalink.advisorProfile.action.ListAdvisorProfileAction">
        <result name="success" type="redirect">advisorProfile</result>
    </action> 
</package>

这是 web.xml

<?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
        <display-name>Struts 2</display-name>   
        <context-param>
            <param-name>source</param-name>
            <param-value>jdbc/Data</param-value>
        </context-param>

        <filter>
            <filter-name>AjaxAnywhere</filter-name>
            <filter-class>org.ajaxanywhere.AAFilter</filter-class>
        </filter>

        <filter-mapping>
            <filter-name>AjaxAnywhere</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
        <filter-mapping>
            <filter-name>AjaxAnywhere</filter-name>
            <url-pattern>*.action</url-pattern>
        </filter-mapping>

        <filter>   
            <filter-name>struts2</filter-name>   
            <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>   
              <init-param>   
              <param-name>actionPackages</param-name>   
              <param-value>org.apache.struts2.showcase.person</param-value>   
              </init-param>   
        </filter> 
        <filter-mapping>
            <filter-name>struts2</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>

        <filter>
            <filter-name>HibernateFilter</filter-name>
            <filter-class>
                com.ob.common.filter.HibernateFilter
            </filter-class>
        </filter>
        <filter-mapping>
            <filter-name>HibernateFilter</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>

        <session-config>
            <session-timeout>30</session-timeout>
        </session-config>

    </web-app>
4

0 回答 0