Please support our JSP advertiser: Lunarpages JSP Web Hosting
![]() |
•
•
Join Date: Sep 2005
Posts: 12
Reputation:
Rep Power: 4
Solved Threads: 0
I am writing a web based application using JSP and JDBC. In side a servlet I execute some code like this
when I move to comments.jsp I find all the comments except those that have been just added by the servlet code written above using addComments(). The next time I access the same page "comments.jsp" that missing comments appear.
The same problem occurs when I delete some comments, the deleted comments still appear on the comments.jps page when I visit the page just after deleting the comments form inside the servlet by calling the DAO method.
So many thanks if someone could guide me properly, about what is the issue (problem).
Good Bye.
DAO.addComments( commentsBean ); commentsList = DAO.getComments(); session.setAttribute( "comments", commentsList ); response.sendRedirect( "comments.jsp" );
when I move to comments.jsp I find all the comments except those that have been just added by the servlet code written above using addComments(). The next time I access the same page "comments.jsp" that missing comments appear.
The same problem occurs when I delete some comments, the deleted comments still appear on the comments.jps page when I visit the page just after deleting the comments form inside the servlet by calling the DAO method.
So many thanks if someone could guide me properly, about what is the issue (problem).
Good Bye.
Offhand it would be difficult to point out the actual cause of your application _not working_ but I guess the collection used to hold values is not getting updated or the DAO methods are returning rogue values in your case. Without more code, I don't think anyone would be as such able to lend a helping hand.
I don't accept change. I don't deserve to live.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
![]() |
Similar Threads
Other Threads in the JSP Forum
- JSP connection to database (JSP)
- looking for a jsp programmer (Web Development Job Offers)
- jsp and mysql (JSP)
- How to install JDBC Driver for MSSQL ? (JSP)
- JSP programmers needed (Web Development Job Offers)
- jdbc help? (Java)
- Move out java code from jsp (Java)
- final year project (Java)
- connecting to mssql with using jsp (JSP)
Other Threads in the JSP Forum
- Previous Thread: fetching data from the database
- Next Thread: user authentication and authorization
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode