关于eclipse工程路径
来源:互联网 发布:微信抢红包软件源代码 编辑:程序博客网 时间:2024/04/29 13:06
path basePath 与 不写的区别:
path 表示项目名称;
basePath 表示: http://localhost:8080/CRM/【请求路径页面】
不写 表示:当前的js 与这个页面在同一级目录下
function page_go()
{
document.forms[0].action="/CRM/html/right.do?method=initSysUser";
document.forms[0].submit();
}
function Seacher()
{
document.forms[0].action="html/right.do?method=SeacherSysUser";
document.forms[0].submit();
}
//这两者相同 http://localhost:8889/CRM/html/index.jsp
是因为在请求的时候是这样的 前缀 http://localhost:8889/CRM/ 会加上 如果写:
function Seacher()
{
document.forms[0].action="/html/right.do?method=SeacherSysUser";
(加了一个斜杠报 400 错误 这时路径为 http://localhost:8889/CRM//html/xx.do?method=方法名)
(如果加了一个斜杠 必须加 全路径 /CRM/html/right.do?method=initSysUser 这样子会覆盖)
document.forms[0].submit();
}
struts 表单的话可以带xx.do 的请求 如果带了的话 struts 就会默认的去写
<html:form action="html/role?method=updateSysRoleById" method="post" onsubmit="return check()">
<html:form action="/html/~right/rightManage.do?method=editUser" method="post">
这两者都是正确的
但是他们两者的stutsConfig不同:
前者:
<!--用户管理 -->
<action path="html/right"
type="com..crm.right.zl.web.action.SysUserAction"
name="SysUserForm"
scope="request"
parameter="method"
>
<forward name="userList" path="/html/~right/user/list.jsp"></forward>
<forward name="add" path="/html/~right/user/add.jsp"></forward>
<forward name="detail" path="/html/~right/user/detail.jsp"></forward>
<forward name="dispatch" path="/html/~right/user/dispatch.jsp"></forward>
<forward name="edit" path="/html/~right/user/edit.jsp"></forward>
后者:
<!-- 权限管理 -->
<action path="/html/~right/rightManage"
type="com..crm.rightmanage.xmc.web.action.RightManageAction"
name="rightForm"
parameter="method"
scope="request"
>
<forward name="loginfail" path="/login.jsp" redirect="true"></forward>
<forward name="loginsuccess" path="/html/index.jsp" redirect="true"></forward>
<forward name="userList" path="/html/~right/user/list.jsp"></forward>
<forward name="toEditUser" path="/html/~right/user/edit.jsp"></forward>
<forward name="dispacth" path="/html/~right/user/dispatch.jsp"></forward>
<forward name="details" path="/html/~right/user/detail.jsp"></forward>
<forward name="roleList" path="/html/~right/role/list.jsp"></forward>
<forward name="toUpdateRole" path="/html/~right/role/roleAndRights.jsp"></forward>
</action>
注意带.do的表单 必须加上一个/
如: <!-- 权限管理 -->
<action path="/html/~right/rightManage" 这个路径与那个超链接匹配
type="com.crm.rightmanage.xmc.web.action.RightManageAction"
name="rightForm"
parameter="method"
scope="request"
>
http://localhost:8080/CRM/html/~right/rightManage.do?method=selectSalaryStandard
表单提交为:
<html:form action="/html/~right/rightManage.do?method=editUser" method="post">
<html:form action="html/~right/right?method=EditUser" method="post" onsubmit="return check()">
//HR 路径问题:
超链接:显示: http://localhost:8080/HR/page/salaryCriterion/salaryCriterion.do?method=selectSalaryStandard
那么在struts-config中应该这样配置:
<action path="/page/salaryCriterion/SalaryCriterion"
name="salaryCriterionForm"
type="org.springframework.web.struts.DelegatingActionProxy"
parameter="method"
scope="request"
>
<forward name="salarystandard_query_list"path="/page/salaryCriterion/salarystandard_query_list.jsp"></forward>
</action>
因为:它提交是截取: http://localhost:8080/HR
另外有一个在webRoot的下有一个文件夹: page page下有一个文件夹 salaryCriteria 有 jsp 页面 当我请求
当我 点击jsp 页面的时候,,又要在jsp 连接到 文件夹 salaryCriteria 的 jsp 页面中,,那么page不需要带了
因为在先前请求jsp页面 已经带了
<a href="salaryCriterion/SalaryCriterion.do?method=selectSalaryStandard" target="mainFrame">薪酬标准登记复核</a>
salaryCriterion/salarystandard_change_locate.jsp
http://www.myexception.cn/java%20exception/120.html
path 表示项目名称;
basePath 表示: http://localhost:8080/CRM/【请求路径页面】
不写 表示:当前的js 与这个页面在同一级目录下
function page_go()
{
document.forms[0].action="/CRM/html/right.do?method=initSysUser";
document.forms[0].submit();
}
function Seacher()
{
document.forms[0].action="html/right.do?method=SeacherSysUser";
document.forms[0].submit();
}
//这两者相同 http://localhost:8889/CRM/html/index.jsp
是因为在请求的时候是这样的 前缀 http://localhost:8889/CRM/ 会加上 如果写:
function Seacher()
{
document.forms[0].action="/html/right.do?method=SeacherSysUser";
(加了一个斜杠报 400 错误 这时路径为 http://localhost:8889/CRM//html/xx.do?method=方法名)
(如果加了一个斜杠 必须加 全路径 /CRM/html/right.do?method=initSysUser 这样子会覆盖)
document.forms[0].submit();
}
struts 表单的话可以带xx.do 的请求 如果带了的话 struts 就会默认的去写
<html:form action="html/role?method=updateSysRoleById" method="post" onsubmit="return check()">
<html:form action="/html/~right/rightManage.do?method=editUser" method="post">
这两者都是正确的
但是他们两者的stutsConfig不同:
前者:
<!--用户管理 -->
<action path="html/right"
type="com..crm.right.zl.web.action.SysUserAction"
name="SysUserForm"
scope="request"
parameter="method"
>
<forward name="userList" path="/html/~right/user/list.jsp"></forward>
<forward name="add" path="/html/~right/user/add.jsp"></forward>
<forward name="detail" path="/html/~right/user/detail.jsp"></forward>
<forward name="dispatch" path="/html/~right/user/dispatch.jsp"></forward>
<forward name="edit" path="/html/~right/user/edit.jsp"></forward>
后者:
<!-- 权限管理 -->
<action path="/html/~right/rightManage"
type="com..crm.rightmanage.xmc.web.action.RightManageAction"
name="rightForm"
parameter="method"
scope="request"
>
<forward name="loginfail" path="/login.jsp" redirect="true"></forward>
<forward name="loginsuccess" path="/html/index.jsp" redirect="true"></forward>
<forward name="userList" path="/html/~right/user/list.jsp"></forward>
<forward name="toEditUser" path="/html/~right/user/edit.jsp"></forward>
<forward name="dispacth" path="/html/~right/user/dispatch.jsp"></forward>
<forward name="details" path="/html/~right/user/detail.jsp"></forward>
<forward name="roleList" path="/html/~right/role/list.jsp"></forward>
<forward name="toUpdateRole" path="/html/~right/role/roleAndRights.jsp"></forward>
</action>
注意带.do的表单 必须加上一个/
如: <!-- 权限管理 -->
<action path="/html/~right/rightManage" 这个路径与那个超链接匹配
type="com.crm.rightmanage.xmc.web.action.RightManageAction"
name="rightForm"
parameter="method"
scope="request"
>
http://localhost:8080/CRM/html/~right/rightManage.do?method=selectSalaryStandard
表单提交为:
<html:form action="/html/~right/rightManage.do?method=editUser" method="post">
<html:form action="html/~right/right?method=EditUser" method="post" onsubmit="return check()">
//HR 路径问题:
超链接:显示: http://localhost:8080/HR/page/salaryCriterion/salaryCriterion.do?method=selectSalaryStandard
那么在struts-config中应该这样配置:
<action path="/page/salaryCriterion/SalaryCriterion"
name="salaryCriterionForm"
type="org.springframework.web.struts.DelegatingActionProxy"
parameter="method"
scope="request"
>
<forward name="salarystandard_query_list"path="/page/salaryCriterion/salarystandard_query_list.jsp"></forward>
</action>
因为:它提交是截取: http://localhost:8080/HR
另外有一个在webRoot的下有一个文件夹: page page下有一个文件夹 salaryCriteria 有 jsp 页面 当我请求
当我 点击jsp 页面的时候,,又要在jsp 连接到 文件夹 salaryCriteria 的 jsp 页面中,,那么page不需要带了
因为在先前请求jsp页面 已经带了
<a href="salaryCriterion/SalaryCriterion.do?method=selectSalaryStandard" target="mainFrame">薪酬标准登记复核</a>
salaryCriterion/salarystandard_change_locate.jsp
http://www.myexception.cn/java%20exception/120.html
- 关于eclipse工程路径
- eclipse更改默认工程路径
- 关于工程的路径问题
- 关于vs2008改变工程路径
- Eclipse插件工程中路径的问题
- eclipse,工程/文件目录,相对路径
- Eclipse修改默认的工程路径WorkSpace
- eclipse,工程/文件目录,相对路径
- 关于eclipse中的图片路径
- 关于JAVA工程路径的问题【转】
- 关于创建工程的路径选择问题
- 关于VS2010工程各种路径注意事项汇总
- 关于eclipse中Android工程的库
- 关于eclipse工程转到androidstudio 的问题
- 关于工程导入eclipse中的问题
- 关于使用eclipse创建一个servlet工程
- [Eclipse]关于java工程打包的知识
- 关于eclipse中的web工程问题解决
- 树形结构转换线性结构的方法(lca倍增)
- hdu——2018
- 使用Vitamio打造自己的Android万能播放器(1)——准备
- 分组ListView
- 链表的创建与遍历
- 关于eclipse工程路径
- 关于@ModelAttribute的理解
- 三颗锦囊用完,苹果新iPad今年挡得住两大集团军吗?
- 使用Vitamio打造自己的Android万能播放器(2)—— 手势控制亮度、音量、缩放
- 使用Vitamio打造自己的Android万能播放器(3)——本地播放(主界面、播放列表)
- 稀疏表达:向量、矩阵与张量(中)
- 自动生成makefile
- HDU1150-- Machine Schedule( 二分图最小顶点覆盖)
- poj 1850 poj 1496