You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.asciidoc
+43-29
Original file line number
Diff line number
Diff line change
@@ -1,36 +1,31 @@
1
1
Java EE 7 using Eclipse
2
2
=======================
3
3
4
+
Project creation
5
+
----------------
6
+
4
7
* Create a simple Dynamic Web Project
5
-
** Basic app
6
-
*** Choose the module version as ``3.1''
7
-
*** Add a new configuration for WildFly
8
-
*** Add `index.html` in ``WebContent''
9
-
***``Run as'', ``Run on Server''
10
-
*** Change content on `index.html` and show LiveReload
11
-
** Servlet
12
-
*** Add a new Servlet
13
-
*** In Servers tab, select the module, right-click and select ``Restart'' to restart the module
14
-
*** Show http://localhost:8080/helloworld/HelloServlet
15
-
** Persistence
16
-
*** Right-click on project, select ``Properties'', search for ``facet'', enable ``JPA'', click on ``Apply'', talk about ``Further configuration available'' and default data source
17
-
** Create a new entity
18
-
** Add a primary key
19
-
+
20
-
[source, java]
21
-
----
22
-
@Id
23
-
private int id;
24
-
----
25
-
+
26
-
** Generate Getter/Setter by clicking ``Source'', ``Getters and Setters''.
27
-
** Copy the https://github.com/jboss-developer/jboss-eap-quickstarts/blob/6.3.0.GA/h2-console/h2console.war?raw=true[H2 console war] to the server standalone/deployments directory.
28
-
** Start the server and access http://localhost:8080/h2console
29
-
** You need to enter the JDBC URL, and credentials. To access the "test" database your application uses, enter these details:
** Add the following properties to `persistence.xml`:
8
+
** Choose the module version as ``3.1''
9
+
** Add a new configuration for WildFly
10
+
** Add `index.html` in ``WebContent''
11
+
**``Run as'', ``Run on Server''
12
+
** Change content on `index.html` and show LiveReload
13
+
14
+
Servlet
15
+
-------
16
+
17
+
* Add a new Servlet
18
+
** In Servers tab, select the module, right-click and select ``Restart'' to restart the module
19
+
** Show http://localhost:8080/helloworld/HelloServlet
20
+
21
+
Persistence
22
+
-----------
23
+
24
+
* Right-click on project, select ``Properties'', search for ``facet'', enable ``JPA'', click on ``Apply'', talk about ``Further configuration available'' and default data source
25
+
* Create a new entity
26
+
* Add a primary key in the wizard. Use `long` datatype and name as `id`.
27
+
* Generate Getter/Setter by clicking ``Source'', ``Getters and Setters''.
28
+
* Add the following properties to `persistence.xml`:
34
29
+
35
30
[source.xml]
36
31
----
@@ -46,6 +41,25 @@ private int id;
46
41
</properties>
47
42
----
48
43
+
44
+
* Show ``server console'' when the application is deployed. Show the generated SQL statements.
45
+
46
+
Setup console to watch database
47
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48
+
49
+
* Download https://github.com/jboss-developer/jboss-eap-quickstarts/blob/6.3.0.GA/h2-console/h2console.war?raw=true[H2 console war] to the server `standalone/deployments` directory
0 commit comments