473,394 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

use mod_python' session and redirect

hi all
when i use Session object to save a object and then i use
util.redirect(req,url) to redirect a .psp.But in my psp i cann't load
session so i cann't get object from session,help me,thanks
here is my code
..py
s=Session.Session(req)
s["cur_user"]=user
s.set_timeout(18000)
s.save()
util.redirect(req, "/psp/user/edituser.psp")
edituser.psp
<%
import com.lgd.model.allmodel as am
from mod_python import Session
sess=Session.Session(req)
user=am.User()
uname=None
upass=None
fullname=None
email=None
if sess.is_new():
req.write("somethin opration")
else:
user=sess["cur_user"]
uname=user.uname
upass=user.upass
fullname=user.fullname
email=user.email
%>
Sep 5 '05 #1
0 1589

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Markus Schaber | last post by:
Hi, Does anybody know a module that works with Apache 1.3 mod_python and provides session tracking? I tried pso, but this didn't work as it should. Running in mod_python gives me one session...
2
by: Rolfe | last post by:
Has anyone had success getting mod_python to run on Apache on Win2K? I'm writing up instructions on how to do this and need your help. When completed, the instructions at the mod_python website and...
1
by: PyPK | last post by:
Hi I'm trying to learn mod python and need some one to explain how to do http redirection(302) with an example code....
1
by: treelife | last post by:
I'm getting and internal server error when | run the following mod_python script. I am actually trying to run Django. Script: from mod_python import apache def handler(req):...
2
by: exhuma.twn | last post by:
Hi again, as soon as I try to make use of the "session" object inside a psp-template file, I get the following error: Mod_python error: "PythonHandler mod_python.publisher" Traceback (most...
2
by: Scott | last post by:
I am trying to get a mod_python application to read an existing PHP session. I need some data that was set in the session by the PHP application. I am using the mod_python Session class but even...
0
by: Manuzhai | last post by:
Hello there, I have this weird problem with a mod_python application. Recently I installed ElementTree and cElementTree through ez_setup.py, even though they were already installed normally...
5
by: lyealain | last post by:
<% If Session("username") = "" Then Response.Redirect("/CLS/Login.asp") End If Dim conn Dim connectstr Dim db_name, db_username, db_userpassword Dim db_server Dim res
1
by: Jan Danielsson | last post by:
Hello all, This is probably more of an apache question, but I'm guessing there will be other mod_python-beginners who are wondering the same thing. Let's say I have a web app called MyApp....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.