Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
shiva kumar.m
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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.
 
Paul Clapham
Sheriff
Posts: 22480
43
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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.
 
Nirman Kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!