• 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

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: 28226
95
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: 43081
77
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic