Solved

How to create session Id

Posted on 2011-03-04
14
304 Views
Last Modified: 2012-08-14
Hi ,

How to create session id .  to append the URL ?

i tried with session.getId(); but it return wrong session id.  is there any other way of create session id ?
0
Comment
  • 7
  • 7
14 Comments
 
LVL 92

Expert Comment

by:objects
ID: 35034328
> How to create session id .  to append the URL ?

Why do you need to append it to the url?
Typically the container looks after that for you.

> i tried with session.getId(); but it return wrong session id.

thats the correct method, where did you get the session object from?
0
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35035033
>>>>>Why do you need to append it to the url?

For  web services call  i need to apped jsessionID values for authoraztion purpose !

example : https://xxx/Services/Integration;;jsessionid="+session.getId();
>>>>>thats the correct method, where did you get the session object from?
In particular java class

i check request.getSession(true) then i get that value !
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 35035046
that all sounds fine. what makes you think its the wrong id?
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35035067

> Whn i try to call my web services i got following error

ErrorMessage:Internal Error: Session is not available. Aborting.
0
 
LVL 92

Expert Comment

by:objects
ID: 35035095
you need to check the url and see exactly what you are passing, and check if that matches what the web service is expecting.
0
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35035139
Ya thats correct only . URL is correct .the same thing done by other vendor my client thats working fine .

is session digit is diffrent from each IDE ?
0
 
LVL 92

Expert Comment

by:objects
ID: 35035182
the session comes from the request, has nothing to with the ide
0
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35035223
Is there any other way to generate session id ??
0
 
LVL 92

Expert Comment

by:objects
ID: 35035925
no, wouldn't make sense to be as they are directly associated with the request. You cannot have a session without a request.
0
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35036095
what about geting deatils from cokkies ?
0
 
LVL 92

Expert Comment

by:objects
ID: 35036255
cookies from where, what response are you dealing with.
What exactly are you trying to get the session id of?

If you're calling a web service then it should be providing you with a session id (in the initial response most likely)
0
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35036407
i want to send session Id for aruthincation purpose !
we not provide user id and password !
0
 
LVL 92

Expert Comment

by:objects
ID: 35040915
then you need to get the session id from whatever is authenticating you
0
 
LVL 20

Author Closing Comment

by:Sathish David Kumar N
ID: 35082279
I misunderstand the concept . spening time for this question i have the mark
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to implement Singleton Design Pattern in Java.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question