解决方案 »
- 解析类似mybatis if标签的思路
- Cannot find bean strName in any scope
- hibernate主从表操作问题
- 这个异常,太怪了,求求大家帮我解决阿
- Spring多配置文件的问题
- logic标签如果表示and 和or 关系
- SQL Server2000 jdbc问题
- 没办法 只能来请大侠们看看了 struts formBean问题
- 初学java,第一个java程序helloworld都宣告失败!
- 新手求助 HTTP method GET is not supported by this URL是为什么
- 打算学SSH 框架,有什么书籍或资料推荐的吗?
- artdialog遮罩层在内容层的下面一层,因而无法屏蔽用户操作
if("123".equals(pwd)){
request.getRequestDispatcher("/form/success.html")
.forward(request, response);//这是内部跳转
}else{
request.getRequestDispatcher("form/error.html")
.include(request, response);//这是内部跳转
}
}else{
response.sendRedirect("/MyServlet/form/error.html");//服务器外部跳转
}
我博客也有一篇简单总结:
http://blog.csdn.net/forrest_chen/article/details/16975271
希望给你帮助
redirect:重定向。
都支持后台代码内部跳转。
Dispthcher 和Redirect 页面改变而url不改变吗?
queryForm1.target 指向一个隐藏的iframe
* @author
*
*/
@Results({ @Result(name = "result", location = "/${nextAction}", type = "redirect") })
public class EchoAction extends EditAction { /**
*
*/
private static final long serialVersionUID = 1L; private String echo;
private String nextAction; /*
* (非 Javadoc)
*
* @see com.opensymphony.xwork2.ActionSupport#execute()
*/
@Override
public String execute() throws Exception {
String url = ServletActionContext.getRequest().getParameter("echo");
System.out.println(">>>>>>>>>>>>>>>>>>>>" + url);
if (StringUtils.isBlank(url))
this.nextAction = "system/user-list";
else
this.nextAction = "system/user-list";
// this.nextAction = url;
return "result";
} /**
* @return nextAction
*/
public String getNextAction() {
return nextAction;
} /**
* @param nextAction
* 要设置的 nextAction
*/
public void setNextAction(String nextAction) {
this.nextAction = nextAction;
} /**
* @return echo
*/
public String getEcho() {
return echo;
} /**
* @param echo 要设置的 echo
*/
public void setEcho(String echo) {
this.echo = echo;
}}
好像是我想要的, 具体怎么做 指点一二
1.网站首页(main.html)主要分为上下两部分框架(frame),上位banner,下为content.
2.登陆之后直接跳转到main.html,之后的所有跳转都在content所在的frame中,则url始终为首页的url.
<iframe id="content-frame" name="content-frame" frameborder="0" src="welcome.html"
style="border: none ; width: 100% ; _width:100% ; height:100%; "></iframe>
</div>
这样写使<iframe>为你的context区域,要跳转直接在js里面修改src链接就OK了,,地址永远是你的首页地址。不用谢,,求分