Skip to content

Commit 4fe35ae

Browse files
committed
More comments and connector
1 parent 427ff67 commit 4fe35ae

File tree

6 files changed

+87
-3
lines changed

6 files changed

+87
-3
lines changed

ReadMe.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,13 @@ You need to install those plugins:
4444
- JavaEE Base
4545
- Maven
4646

47-
Click on `Run project` or type F6.
47+
Click on `Run project` or type F6.
48+
49+
= Debug the application =
50+
51+
== In NetBeans ==
52+
53+
1. Define breakpoints if needed.
54+
2. Click on `Debug Project` or type Ctrl+F5.
55+
3. In the project custom menu, click on `Run GWT code server`.
56+
4. Visit the url said by the code server to install the bookmarklet.

nbactions.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<actions>
3+
<action>
4+
<actionName>CUSTOM-Run GWT code server</actionName>
5+
<displayName>Run GWT code server</displayName>
6+
<goals>
7+
<goal>gwt:run-codeserver</goal>
8+
</goals>
9+
</action>
10+
<action>
11+
<actionName>CUSTOM-Run GWT dev mode</actionName>
12+
<displayName>Run GWT dev mode</displayName>
13+
<goals>
14+
<goal>gwt:run</goal>
15+
</goals>
16+
<properties>
17+
<runTarget>hellogwt/</runTarget>
18+
</properties>
19+
</action>
20+
</actions>

pom.xml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,15 @@ Now, we add GWT (gwt-servlet and gwt-user artifacts) and Log4J to our project.
2323
<gwt.version>2.7.0</gwt.version>
2424
<mybatis.version>3.2.1</mybatis.version>
2525
<mybatis-spring.version>1.2.0</mybatis-spring.version>
26+
<!--
27+
<mysql-connector-java.version>5.1.18</mysql-connector-java.version>
28+
-->
29+
<!-- http://mvnrepository.com/artifact/org.postgresql/postgresql -->
30+
<!--
31+
<postgresql-connector-java.version>9.3-1102-jdbc3</postgresql-connector-java.version>
32+
-->
2633
<!-- http://mvnrepository.com/artifact/org.xerial/sqlite-jdbc -->
27-
<sqlite-jdbc.version>3.8.7</sqlite-jdbc.version>
34+
<sqlite-connector-java.version>3.8.7</sqlite-connector-java.version>
2835
<!-- Note: GWT needs at least java 1.6 -->
2936
<maven.compiler.source>1.7</maven.compiler.source>
3037
<maven.compiler.target>1.7</maven.compiler.target>
@@ -43,6 +50,7 @@ Now, we add GWT (gwt-servlet and gwt-user artifacts) and Log4J to our project.
4350
<artifactId>spring-jdbc</artifactId>
4451
<version>${spring.version}</version>
4552
</dependency>
53+
4654
<!-- GWT -->
4755
<dependency>
4856
<groupId>com.google.gwt</groupId>
@@ -55,11 +63,24 @@ Now, we add GWT (gwt-servlet and gwt-user artifacts) and Log4J to our project.
5563
<version>${gwt.version}</version>
5664
<type>jar</type>
5765
</dependency>
66+
<dependency>
67+
<groupId>com.google.gwt</groupId>
68+
<artifactId>gwt-dev</artifactId>
69+
<version>${gwt.version}</version>
70+
</dependency>
71+
<dependency>
72+
<groupId>com.google.gwt</groupId>
73+
<artifactId>gwt-codeserver</artifactId>
74+
<version>${gwt.version}</version>
75+
</dependency>
76+
77+
<!-- log4j -->
5878
<dependency>
5979
<groupId>log4j</groupId>
6080
<artifactId>log4j</artifactId>
6181
<version>${log4j.version}</version>
6282
</dependency>
83+
6384
<!-- persistence -->
6485
<dependency>
6586
<groupId>org.mybatis</groupId>
@@ -71,10 +92,22 @@ Now, we add GWT (gwt-servlet and gwt-user artifacts) and Log4J to our project.
7192
<artifactId>mybatis-spring</artifactId>
7293
<version>${mybatis-spring.version}</version>
7394
</dependency>
95+
<!--
96+
<dependency>
97+
<groupId>mysql</groupId>
98+
<artifactId>mysql-connector-java</artifactId>
99+
<version>${mysql-connector-java.version}</version>
100+
</dependency>
101+
<dependency>
102+
<groupId>org.postgresql</groupId>
103+
<artifactId>postgresql</artifactId>
104+
<version>${postgresql-connector-java.version}</version>
105+
</dependency>
106+
-->
74107
<dependency>
75108
<groupId>org.xerial</groupId>
76109
<artifactId>sqlite-jdbc</artifactId>
77-
<version>${sqlite-jdbc.version}</version>
110+
<version>${sqlite-connector-java.version}</version>
78111
</dependency>
79112
</dependencies>
80113

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CREATE DATABASE hellogwt;
2+
USE hellogwt;
3+
4+
CREATE TABLE greetings (
5+
id INT NOT NULL AUTO_INCREMENT,
6+
author VARCHAR(30),
7+
text VARCHAR(50),
8+
PRIMARY KEY (id)
9+
);
10+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CREATE TABLE greetings (
2+
id SERIAL,
3+
author VARCHAR(30),
4+
text VARCHAR(50),
5+
PRIMARY KEY (id)
6+
);

src/main/webapp/WEB-INF/jdbc.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ jdbc.url=jdbc:sqlite:hellogwt.db
77
jdbc.username=tomcat
88
jdbc.password=tomcat
99

10+
! For MySQL:
11+
!jdbc.driverClassName=com.mysql.jdbc.Driver
12+
!jdbc.url=jdbc:mysql://localhost:3306/hellogwt
13+
!jdbc.username=tomcat
14+
!jdbc.password=tomcat
15+
1016
! For PostgreSQL:
1117
!! createuser --no-createdb --login --no-createrole --no-superuser --password tomcat
1218
!! echo "localhost:5432:*:tomcat:tomcat" >> ~/.pgpass

0 commit comments

Comments
 (0)