Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hadisfr/tomcatsqlite
a simple example of using SQLite database management system with Apache Tomcat
https://github.com/hadisfr/tomcatsqlite
java jdbc sqlite tomcat
Last synced: 25 days ago
JSON representation
a simple example of using SQLite database management system with Apache Tomcat
- Host: GitHub
- URL: https://github.com/hadisfr/tomcatsqlite
- Owner: hadisfr
- Created: 2018-07-08T19:46:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-08T19:48:14.000Z (over 6 years ago)
- Last Synced: 2023-03-05T14:35:06.950Z (over 1 year ago)
- Topics: java, jdbc, sqlite, tomcat
- Language: Java
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Tomcat SQLite
===
a simple example of using SQLite DataBase Management System (DBMS) with Apache TomcatThis project uses Apache Maven 2 to manage dependencies, [xerial's SQLite JDBC Driver](https://github.com/xerial/sqlite-jdbc) to communicate with database, and SQLite as DBMS to run a servlet on Apache Tomcat.
It's possible to make a new tomcat project using maven with running `create.sh`, or:
```
mvn archetype:generate -D groupId=ir.hadisafari.tomcatSqlite -D artifactId=tomcatSqlite -D archetypeArtifactId=maven-archetype-webapp -D interactiveMode=false
```To run project, you can run `deploy.sh`, or simply use `mvn tomcat7:redeploy` after installation of sqlite. After that, the result may be available on [`http://localhost:8080/tomcatSqlite/`](http://localhost:8080/tomcatSqlite/) based on the configurations of your tomcat.
Also, you may need to add these lines to your `$CATALINA_HOME/conf/tomcat-users.xml`:
```xml```
The database file (`sample.db`) will be create in `$CATALINA_HOME/webapps/tomcatSqlite/WEB-INF/sample.db` after the first run. You may want to use graphical apps like [phpLiteAdmin](https://www.phpliteadmin.org/) to read or edit it.
It's recommended to read [Using SQLiteJDBC with Maven2](https://github.com/xerial/sqlite-jdbc#using-sqlitejdbc-with-maven2) in documentations of xerial's SQLite JDBC Driver.