Servlet Problem - Mpas Not Updating On Parameter Change.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ACO

Servlet Problem - Mpas Not Updating On Parameter Change.

Post by ACO » Wed Nov 20, 2002 9:38 pm

Hi Folks,

I've changed Richards Servlet Example so that details are read from a database (and this part works fine).

But now i have a problem where if i call a jsp like this:

http://localhost:8080/t234/page1.jsp?id=12;

and then change the id:

http://localhost:8080/t234/page1.jsp?id=6;

The image shown is still for id=12, i put a println and it seems that the JSP is still working passing 12 to my dataset producer, - when i restart tomcat it will change (and display the correct data) for the first time, then it sticks with the same data until i restart it - these problems are not happening when i use the void main procedure to run the program - So i think it could be a sesion problem, does anybody have any idea of how i can force the image to refresh.

Jun Hu

Re: Servlet Problem - Mpas Not Updating On Parameter Change.

Post by Jun Hu » Thu Nov 21, 2002 11:49 pm

First, should not be the problem of jfreechart, I was generate image map with the dynamic data retrieved from oracle, it was running ok.
Second, it might be session issue, but if you pay id=12 or id =6, you can always use String passedID=getParameter("id") to get the id passed and received data from database. By the way, set jsp's scope to request or page , which might help you debug about the session issues. Be careful when you are using session.getAttribute(...), especially when you are using multiframe.
third, make sure you name the png/jpeg file generated as different name when you use different dateset.

Jun Hu

Re: Servlet Problem - Mpas Not Updating On Parameter Change.

Post by Jun Hu » Thu Nov 21, 2002 11:53 pm

pay->pass
getParameter(...)->request.getParameter(..)
hope the answer helps
Best regards,
Jun

Locked