Access an SQLITE file on the server that isn't in the WAR directory?

31 views
Skip to first unread message

Fille

unread,
Mar 22, 2012, 8:05:16 AM3/22/12
to google-we...@googlegroups.com
Hi,

I just found out that placing the database file (.sqlite) in the WAR directory isn't that good, since it can be accessed by anyone. 

So I guess that I should move it to /war/WEB-INF/classes or any other suggestions?

Previously I did it this way, which worked:

Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite:database.sqlite");   // (database.sqlite in the war directory)


How can I access the database file now, if I move it to /war/WEB-INF/classes?

Reply all
Reply to author
Forward
0 new messages