struts-config.xml action配置
<action path="/customer"
type="org.springframework.web.struts.DelegatingActionProxy"
parameter="method"
scope="request">aplicatonContext.xml action配置
<bean name="/customer" class="action.CustomerAction" scope="prototype">
<property name="ibaseService" ref="customerServiceImpl"/>
</bean>
CustomerActionpublic ActionForward fenye(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
return mapping.findForward("");
}最后再webRoot/hetong/AddHetong.jsp
我想在这个页面中通过JavaScript访问CustomerAction里的fenye方法,当单击文本框时,执行javascript某个函数,在这个函数里怎么访问CustomerAction
最后补充一点 页面里没有使用form 元素
<action path="/customer"
type="org.springframework.web.struts.DelegatingActionProxy"
parameter="method"
scope="request">aplicatonContext.xml action配置
<bean name="/customer" class="action.CustomerAction" scope="prototype">
<property name="ibaseService" ref="customerServiceImpl"/>
</bean>
CustomerActionpublic ActionForward fenye(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
return mapping.findForward("");
}最后再webRoot/hetong/AddHetong.jsp
我想在这个页面中通过JavaScript访问CustomerAction里的fenye方法,当单击文本框时,执行javascript某个函数,在这个函数里怎么访问CustomerAction
最后补充一点 页面里没有使用form 元素
window.open('customer.do?method=fenye');
}
我这么写为什么报请求路径无效呢
action
CustomerAction
webRoot
hetong
AddCustomer.jsp