Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSP doesn't reflect database changes

843840May 28 2008 — edited May 30 2008
I have a JSP that is supposed to access a database, retrieve a list of goals, and display them. (Yes, I've recently been informed that this violates the MVC model, but I taught myself and I'm on a deadline, so please try to overlook that for the moment.) At the bottom of this page, there is a button that the user can press to add a goal to the list. This leads to a second JSP that accepts information about the goal. When this JSP is submitted, it calls a servlet that adds the goal, then returns to the first JSP (via PostMethod in Jakarta Commons) which should show all previous goals and the newly added goal. But it doesn't.

I know that's a lot to follow, so let me try to diagram it:

JSP #1 (shows goals) -> (select button to add goal) - >JSP #2 (accepts information on new goal to be added) -> (submit new goal) -> Servlet (adds goal to database) -> (return to JSP #1 via Jakarta Commons PostMethod; new goal should show with previous goals, but does not)

I first thought it might be a page caching issue, but I've used Firefox's "Clear Private Data" function at every step of the process, and I get the same results. When I open the database, the new goal shows up, but the JSP does not display it. I've had JSP #1 display the query it sends to the database; I copied it and ran it against the database, and the new goal was returned with the previous ones. Anyone have a suggestion as to what might be the issue?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 27 2008
Added on May 28 2008
23 comments
550 views