Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
    Bookmark Topic Watch Topic
  • New Topic

how to bring variable from previous session to next session  RSS feed

Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
my jsp form is like that there is table having edit and delete option in each row
so when i click on edit button
through following it take me to the servlet with the help of P_id variable which is unique in my database and it should redirect me to the jsp page

function editRecord(P_ID){


following is my servlet code

but it is not redirecting to the jsp page i tried to check the code but putting out.println on various places then i find that due that session it is not working because if i am passing any particular value of P_ID then it is working
here i am using following

String str = request.getQueryString();
int P_ID = Integer.parseInt(str);

as in session string can be passed but P_ID is integer type so i have to do typecasting but i think it is not taking that but this session is working in my delete code so i used in this also. i am not getting why this is not working in my edit code.

Posts: 11445
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post, essentially the same question, multiple times.
Let us continue the discussion in your original topic here
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!