• 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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.
 
Sheriff
Posts: 26768
82
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: 43026
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.
 
The only taste of success some people get is to take a bite out of you. Or this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic