[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1145
  • Last Modified:

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
0
jaggernat
Asked:
jaggernat
  • 2
  • 2
  • 2
1 Solution
 
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
 
objectsCommented:
that should be fine (make sure you close both once done).
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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:
You should make sure you close it in finally blocks.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Glad to help. Why the B-grade?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now