troubleshooting Question

remove file writer from class and use bean instead

Avatar of ckawebcreation
ckawebcreationFlag for United States of America asked on
6 Comments1 Solution261 ViewsLast Modified:
i have an element of a class i need to remove and put into a bean, see attached code, it is a simple file writer that writes a value to a web page, how do i access this code if it is in another class and would i just use a normal bean class?

try {
BufferedWriter out = new BufferedWriter(new FileWriter(context.getRealPath("updates.txt"), true)); 
out.close(); } 
catch (IOException e) {  System.err.println("error in opertation "); // catch the exception, could stop browser freezing
Mick Barry
Java Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Top Expert 2010

The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros