Avatar billede fredand Forsker
16. oktober 2001 - 09:08 Der er 4 kommentarer og
1 løsning

Session problemo

Hola!

I have a website devided into 2 dirs, one for public and one for admin.

In the public part I set a object into the session, after that in some case the user can enter the admin part (the other dir) and when he returns to the public part (the first dir) the session is gone.

I guess that this happens because of the different dirs, but since the project is quite big I can\'t change the dir-structure.

So if anyone can tell me how to solve this properly I would be most thankful.

Bets Regards

Fredrik
Avatar billede disky Nybegynder
16. oktober 2001 - 09:12 #1
When you say you put the object into the session, you mean you store it on the session stack ?

Do you use beans ? If so what is their scope ?
Avatar billede fredand Forsker
16. oktober 2001 - 09:23 #2
Hola Disky!

I Set this like this:
if(request.getParameter(\"tikd\") != null && !request.getParameter(\"tikd\").trim().equals(\"\"))
{
  tikd = request.getParameter(\"tikd\");
  FilePost filePost = new FilePost tikd, \"\");
  session.setAttribute(Constants.FILEPOST, filePost);
    }

I do this in a tag, and in the method doStartTag() with the scope: return Tag.SKIP_BODY;

So I guess that I store this in the session-stack.

Hope this gave you a hint!
Avatar billede disky Nybegynder
16. oktober 2001 - 09:27 #3
Yep that\'s on the session stack.

But i can\'t see why that does not work in the other directory

can i see how you use that object from the session ?
Avatar billede fredand Forsker
16. oktober 2001 - 09:33 #4
Hola!

Yes, I think you have get me to think different, give me a minute, to check exectly what happens.

/Fredrik
Avatar billede fredand Forsker
16. oktober 2001 - 12:41 #5
Hola Disky!

Thanks for your time, but it looks like that my problem was my own fault and had nothing to do with the session.

Best Regards
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester