• 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
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

Java, JSTL, MySql, Apache Tomcat 6 - Data not retrieved - Session Issue

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am shiva, developing an dashboard application in Java, JSTL, MySql, Apache Tomcat 6.
I have the below files
1. Dashboard.java (model)
2. DashboardDAO.java (dao)
3. DashboardController.java (Controller)
//Source



//Source
4. Dashboard.jsp (view)
//Source


//source
5. web.xml
//source




//source

It works in the first time. But, after sometime the data is not retrieved and display empty screen. Once, i stop and start the server again, the data is getting retrieved again. But, later when we refresh the empty page is getting displayed again.
Help is really appreciated.
Thanks in advance.
Shiva.
 
Marshal
Posts: 26690
81
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks to me like your dashboard.jsp is designed so that your Dashboard servlet will forward to it. Although you left out some important code from the latter so it's impossible to know for sure. Anyway if that's the case then it really makes no sense to have dashboard.jsp be the welcome file.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you do session.getAttribute("dboard") in your jsp , at first attempt it shows not null and second attempt it is null , hence it not shown in your jsp. Try to make normal page than welcome page.
 
shiva kumar.m
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep I did Nirmal some other .jsp pages to, but not helped me.
I strongly feel it is the problem with Session. I am very poor in Session management
 
Rancher
Posts: 43024
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What Paul said. You need to ensure that the JSP is not reached directly, because it would be missing the required data that the servlet adds if the session expires.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic