Struts.xml
namespace="/stream/streamQuery">
<!-- 进首页方法 -->
class="com.stream.query.action.StreamQueryAction">
index.jsp
<!-- 左侧树形数据请求 -->
<action name="queryTermInfoTree1" method="queryTermInfoTree"
class="com.stream.query.action.StreamQueryAction">
</action>
</package>
页面
tree = new Ext.tree.TreePanel({
region: 'center',
title: '终端列表',
columnWidth:.2,
border : true,
animate : true,
rootVisible: false,
split: true,
height:treePanelHeight,
autoScroll : true,
containerScroll : false, // 随自身或父容器的改变而显示或隐藏scroll
loader : new Ext.tree.TreeLoader({
url: "<%=request.getContextPath() %>/stream/streamQuery/queryTermInfoTree1.action"
<%-- dateUrl : "<%=request.getContextPath() %>/comsview/monitor/statemanager.action" --%>
}),
root : new Ext.tree.AsyncTreeNode({
//设置id,让后台知道应该在何时返回根节点的子点数据
id : '0',
text : '我是根'
})
});
url跳不到指定的action页面,请各位大神帮忙!
1.建立web project工程,我的结构如下:
2.这一步非常重要:引入必要的jar包,很多博客丫的就给出7个jar包,别理他们!根本不完整!版本2.3.8的struts2需要的jar包如下:一共11个!
引入方法是:右键工程->properties->java build path->Libraries->add external jar 把这11个jar包引入进去!(......
答案就在这里:MyEclipse 配置 struts-2.3.8
----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。
f12看下控制台报的什么错,