• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

bookmarking a page using session variables

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am developing a application where the user reads a chapter which contains number of pages. The pages navigates by pagination functionality. Here i am doing bookmarks and adding favourites using servlet.,i.e.i will store the subject name, chapter and current page of the chapter he is reading into database using session.getAttribute.Also i will get the url name using below code
<code>
<%
String reqUrl = req.getRequestURL().toString();
String queryString = req.getQueryString(); // d=789
if (queryString != null) {
reqUrl += "?"+queryString;
}
return reqUrl;
%>
</code>


and get into servlet using session.getAttribute method.

NOw i had stored all the fields. My problem is that when want to see the book mark page or add my favourite page i am not directing to correct bookmarked page and my favouritepage. I am passing the myfavourite page through href. Since i stored the values in sessions i am getting this p[roblem . How can i overcome this problem?

My goal is that i have to add a page that is in pagination to my add favourties list that stores in database. When i retirve or want to view my added page page how can i do it?Kindly help me.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand. The URL should have the key so you can retrieve everything else and stick it into the session again.
 
reply
    Bookmark Topic Watch Topic
  • New Topic