clear off memory in java -BufferedReader class

hi experts
I have three links in a jsp page
all the three links point to 3 different jsps before "operation DISPLAY DOCUMENT" . "operation DISPLAY DOCUMENT" is  displaying a crystal report document when submit button is clicked in from any of the three jsp files. After "operation DISPLAY DOCUMENT" all the three links do not point to the three different jsp pages instead they all point the crystal report document. I am just curious as to why this is hapenning. Do i have to clear off the memory or something in my java class which uses BurfferedReader class to display the crystal report document

I do have the statements
out.print(postData);
out.flush();

any sugessions greatly appreciated
thanks
J
LVL 10
jaggernatAsked:
Who is Participating?
 
Mayank SAssociate Director - Product EngineeringCommented:
You should make sure you close it in finally blocks.
0
 
objectsCommented:
Are you closing and reopeining the reader?
0
 
jaggernatAuthor Commented:
no i am just getting an instance of bufferedReader

like this
 ByteArrayOutputStream byteStream = new ByteArrayOutputStream(512);

BufferedReader in = new BufferedReader(new InputStreamReader(
            connection.getInputStream()));
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
objectsCommented:
that should be fine (make sure you close both once done).
0
 
jaggernatAuthor Commented:
whats strange is the three links are pointing to three different jsp pages(which is how its supposed to work) ,but once the crystal report is opened in a window it overrides every other window when something is clicked.

so i think it need to be released from memory or something

thanks
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Glad to help. Why the B-grade?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.