Permalink
Browse files

tracking stats actually work now

  • Loading branch information...
1 parent 0e60a28 commit de01238d3563246fac763ff6a180ddda4a6379e2 @capilkey capilkey committed Jun 14, 2012
Binary file not shown.
@@ -64,8 +64,6 @@
* }
*/
- private static File file = new File("stats.txt");
-
private boolean logout;
public LDAPAuthenticate() {
@@ -428,7 +426,7 @@ private void reset() {
private void increaseStat(int num) {
try {
- FileInputStream fstream = new FileInputStream("stats.txt");
+ FileInputStream fstream = new FileInputStream("/var/lib/tomcat6/webapps/auth/WEB-INF/stats.txt");
// Get the object of DataInputStream
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
@@ -447,15 +445,15 @@ private void increaseStat(int num) {
in.close();
Writer output = null;
- File file = new File("stats.txt");
+ File file = new File("/var/lib/tomcat6/webapps/auth/WEB-INF/stats.txt");
output = new BufferedWriter(new FileWriter(file));
output.write(sb.toString());
output.close();
} catch (Exception e2) {
try {
Writer output = null;
- File file = new File("stats.txt");
+ File file = new File("/var/lib/tomcat6/webapps/auth/WEB-INF/stats.txt");
output = new BufferedWriter(new FileWriter(file));
output.write("0\n0\n0");
output.close();
@@ -469,7 +467,7 @@ private void increaseStat(int num) {
int [] stats = {0,0,0};
try {
- FileInputStream fstream = new FileInputStream("stats.txt");
+ FileInputStream fstream = new FileInputStream("/var/lib/tomcat6/webapps/auth/WEB-INF/stats.txt");
// Get the object of DataInputStream
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
View
Binary file not shown.

0 comments on commit de01238

Please sign in to comment.