?
Solved

How to create session Id

Posted on 2011-03-04
14
Medium Priority
?
309 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 total points
ID: 35035046
that all sounds fine. what makes you think its the wrong id?
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

762 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