I am in need of using of session to check for login. I set the session at the frontend
and now i need to check the same session at backend so as to check for successful login.
Frontend
$session =& JFactory::getSession();
$session->set('username', "abc123");
backend
$session =& JFactory::getSession();
echo $session->get('username');
...
Hi,
For some reason I've having problems reading this session variable within an ajax document, I've got this inside online.php:
`
session_start();
if (isset($_SESSION['username']))
{
$username = $_SESSION['username'];
}
`
For some Reason this is not setting username even when the session var is being used on the host page, i ca...
Is there something fundamentally wrong with the following design, or can anyone see why would the static properties sometimes loose their values ?
I have a class library project containing a class AppConfig; this class is consumed by a Webforms project.
The skeleton of AppConfig class is as follows:
Public Class AppConfig
Implemen...
Hi!
I'm having a weird issue that I can't track down...
For context, I have resources of Users, Registries, and Giftlines. Each User has many Registries. Each Registry has many Giftlines. It's a belongs to association for them in a reverse manner.
What is basically happening, is that when I am creating a giftline, the giftline itself i...
I have got a situation where I have list of records say 10,000, I am using datatable and I am using paging,(10 records per display). I wanted to put put that list in the session as:
facesContext........put("mylist", mylist);
And in the getters of the mylist, I have
public List<MyClass> getMyList() {
if(mylist== null){
my...
Logging into a site I'm working on functions as expected on my local machine but fails on the remote server but ONLY in Internet Explorer. The kicker is that it works in IE locally, just not on the remote machine.
What in the world could cause this? I have stepped through the code on the remote machine and can see the entered login valu...
in PHP i used session and cookie not urlrewriting with PHPSESSID.
but when i opened cookie then i saw the key value pair.but one of them is
path : /
what does path mean,can you explain elaborately.
if i change the path value to /abc/cdddddddddd/efc then what does that mean?
...
if ($_SESSION['user_email']!=$_SESSION['ship_user_email'])
{
$to= $_SESSION['ship_user_email'];
mail($to,$subject,$mail_html,$headers);
}
there is problem in comparing values of both session. value is different but code not working.
...
Hi,
coming from rails 2.3.5 I am used to do something like that:
class MyControllerTest < ActionController::TestCase
test 'should get index if logged in' do
session = method_to_create_a_valid_session # in test_helper.rb
get :index, {}, {:id => session.id}
assert_response :success # redirect would happen if not lo...
i have a login form, which is in login.php. after authorization i moove client to some.php file! so, from following two methods, which is better?
i can send information aboud user id e.t.c by GET
i can use SESSION - s for this
what is more preferred?
and two words about why i ask this question.
i hear somewhere that SESSIONs aren't ...
Hi guys!
I have a problem, will explain how to reproduce the problem:
1- login into my page (sesion variables set as $_SESSION['logged'] = true and $_SESSION['id'] = 123
2-then inside the main menu I click logout option, code like this
function logout()
{
session_start();
$_SESSION['id'] = null;
$_SESSION['logged'] = nu...
For each servlet request I get, I pass, perhaps, 10 methods before I am at where I need to check something in the session and I need the HttpSession.
The only way I can get the HttpSession is from the HttpServletRequest, correct?
How do I keep track of the session for each servlet request? Unfortuantly I cannot simple make a singleton ...
I am getting logged out when I send request by ajax in a login session. I check headers sent by FireBug and show there was not cookie
...
Do the session variables in coldfusion expire or purge before the specified limit? Like say if the expiration is set to 24 hours, and the user only interacts with them for 10 minutes, do they expire if there not being used before the 24 hours?
...
I use a stateless session and the follow HQL.
CreateQuery("select a from Address a")
My Address Class has many BankDetails but i can't access. If i use a normal session it works. What can I do?
...
Why does the property SessionID on the Session-object in an ASP.NET-page change between requests?
I have a page like this:
...
<div>
SessionID: <%= SessionID %>
</div>
...
And the output keeps changing every time I hit F5, independent of browser.
I've seen this work correctly in other projects.
...
I am trying to use the following code to pass information to another site but it keeps giving me an error:
Invalid Code:
$a = $b->doIt("James",$_SESSION['JNum'],"Frank");
Valid Sample Code:
$a = $b->doIt("James","123456","Frank");
In the first example, the page returns "number field is required". The second piece of sample code r...
I use Spring and Hibernate in a web-app,
SessionFactory is injected into a DAO bean, and then this DAO is used in a Servlet through webservicecontext.
DAO methods are transactional, inside one of the methods I use ... getCurrentSession().save(myObject);
One servlet calls this method with an object passed.
The update seems to not b...
Hi,
I've a JSP/Servlet Web App that consist of more than one servlet (and some JSPs)
I need to create an new HttpSession whenever the users access servlet A, knowing that, servlet A is the home page (i.e. he access it as the first servlet/page in the application)
so far so good, I can write the following code at the start of the servl...
I have an app that processes images and use jQuery to display progress to the user.
I done this with writing to a textfile each time and image is processed and than read this status with a setInterval.
Because no images are actually written in the processing (I do it in PHP's memory) I thought a log.txt would be a solution, but I am not...