URN Logo
UNIX Resources » Linux » China Linux Forum » Python 编 程 » 10 » 服务端的页面跳转?
announcement 声明: 本页内容为中国Linux论坛的内容镜像,文章的版权以及其他所有的相关权利属于中国Linux论坛和相应文章的作者,如果转载,请注明文章来源及相关版权信息。
Resources
China Linux Forum(finished)
Linux Forum(finished)
FreeBSD China(finished)
linuxforum.net
  业界新闻与评论
  自由软件杂谈
  IT 人生
  Linux软件快递
  翻译作坊
  Linux图书与评论
  GNU Emacs/XEmacs
  Linux 中文环境和中文化
  Linux桌面与办公软件
  Linux 多媒体与娱乐版
  自由之窗Mozilla
  笔记本电脑上的Linux
  Gentoo
  Debian 一族
  网络管理技术
  Linux 安装与入门
  WEB服务器和FTP服务器
  域名服务器和邮件服务器
  Linux防火墙和代理服务器应用
  文件及打印服务器
  技术培训与认证
  Linux内核技术
  Linux 嵌入技术
  Linux设备驱动程序
  Linux 集群技术
  LINUX平台数据库
  系统和网络安全
  CPU 与 编译器
  系统计算研究所专栏
  Linux下的GUI软件开发
  C/C++编程版
  PHP 技 术
  Java&jsp技术
  Shell编程技术
  Perl 编 程
  Python 编 程
  XML/Web Service 技术
  永远的Unix
  FreeBSD世界
   
服务端的页面跳转?
服务端的页面跳转? - IPOz [2005-03-31 21:11 | 129 byte(s)]
 
Re: 服务端的页面跳转? - IPOz [2005-04-05 23:21 | 194 byte(s)]
 
Re: 服务端的页面跳转? - passworld [2005-04-06 00:11 | 309 byte(s)]
 
Re: 服务端的页面跳转? - IPOz [2005-04-09 21:29 | 309 byte(s)]
 
Re: 服务端的页面跳转? - passworld [2005-04-10 09:32 | 746 byte(s)]
 
Re: 服务端的页面跳转? - yahoo21cn [2005-04-02 04:24 | 76 byte(s)]
 
Re: 服务端的页面跳转? - IPOz [2005-04-03 22:46 | 36 byte(s)]
 
Re: 服务端的页面跳转? - nuccn [2005-04-05 13:16 | 214 byte(s)]
 
Re: 服务端的页面跳转? - yahoo21cn [2005-04-03 23:52 | 168 byte(s)]
 
Subject: 服务端的页面跳转?
Author: IPOz    Posted: 2005-03-31 21:11    Length: 129 byte(s)
[Original] [Print] [Top]
先显示login.py, 当帐号与密码都正确后转到index.py; 而不是先回到浏览器,再调用index.py.

谢谢!

----
------
garbage in, garbage out
[Original] [Print] [Top]
Subject: Re: 服务端的页面跳转?
Author: yahoo21cn    Posted: 2005-04-02 04:24    Length: 76 byte(s)
[Original] [Print] [Top]
什么意思?让.py在web上执行吗?那只要输出html语法就可以了,和py本身关系不大。
[Original] [Print] [Top]
Subject: Re: 服务端的页面跳转?
Author: IPOz    Posted: 2005-04-03 22:46    Length: 36 byte(s)
[Original] [Print] [Top]
我是说:如何从login.py 跳到 index.py
----
------
garbage in, garbage out
[Original] [Print] [Top]
Subject: Re: 服务端的页面跳转?
Author: yahoo21cn    Posted: 2005-04-03 23:52    Length: 168 byte(s)
[Original] [Print] [Top]
<meta http-equiv="refresh" content="1; url=http://youdomain/index.py">

在login.py页面输出这段html代码不就可以了吗?
[Original] [Print] [Top]
Subject: Re: 服务端的页面跳转?
Author: nuccn    Posted: 2005-04-05 13:16    Length: 214 byte(s)
[Original] [Print] [Top]
<script>setTimeout("window.location.replace('index.php')", 0);</script>
在加你的语句中就ok了
另外不知道python有没类似php的header的模块,刚接触python几天,:)
[Original] [Print] [Top]
Subject: Re: 服务端的页面跳转?
Author: IPOz    Posted: 2005-04-05 23:21    Length: 194 byte(s)
[Original] [Print] [Top]
thanks for all your answers !
it seems you donot understand me. e.g., in JAVA i can forward to another servlet without going back to client.
----
------
garbage in, garbage out
[Original] [Print] [Top]
Subject: Re: 服务端的页面跳转?
Author: passworld    Posted: 2005-04-06 00:11    Length: 309 byte(s)
[Original] [Print] [Top]
You have to go back to the client java or python. You can hide the action by redirct with a 302 response but still it is going back to the client.

This is a http or html problem, not a python problem. You should ask it on a http or html forum or read http/html documents yourself.
[Original] [Print] [Top]
Subject: Re: 服务端的页面跳转?
Author: IPOz    Posted: 2005-04-09 21:29    Length: 309 byte(s)
[Original] [Print] [Top]
In OnePage.jsp, the following code will jump to NextPage

application.getRequestDispatcher( "/NextPage.jsp" ).forward( request, response );

donot you think OnePage will back to client first and then visit NextPage ?

----
------
garbage in, garbage out
[Original] [Print] [Top]
Subject: Re: 服务端的页面跳转?
Author: passworld    Posted: 2005-04-10 09:32    Length: 746 byte(s)
[Original] [Print] [Top]
ah. That is create a new request and ask the http server to handle the request again. I don't know if you can do that with cgi cause cgi is a stand alone program which has no idea of a http server.

You should be able to do that with mod_python. mod_python's request object has a "internal_redirect(new_uri)", it said:


Internally redirects the request to the new_uri. new_uri must be a string.

The httpd server handles internal redirection by creating a new request object and processing all request phases. Within an internal redirect, req.prev will contain a reference to a request object from which it was redirected.


[Original] [Print] [Top]
« Previous thread
isinstance是什么东西?
Python 编 程
10
Next thread »
Python Cookbook, 2nd Edition出来啦!!!!!
     

Copyright © 2007 UNIX Resources Network, All Rights Reserved.      About URN | Privacy & Legal | Help | Contact us
备案序号: 京ICP备05006143    webmaster: webmaster@unixresources.net
This page created on 2008-07-17 04:11:16, cost 0.053194999694824 ms.