GeezerVison is showing github.com — update readme · padminipc/demo-java@6ff66c8
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: README.md +13-6Lines changed: 13 additions & 6 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -25,25 +25,32 @@ Here's an example of some things to check after running the build script: |
25 | 25 |
|
26 | 26 | ## Run |
27 | 27 |
|
28 | | -To run and test that Tomcat is serving the the war file: |
| 28 | +Here are the summarized commands to run and test that Tomcat is serving the war file: |
29 | 29 |
|
30 | 30 | docker run --rm -p 8080:8080 -d demo-java |
31 | 31 | docker exec -ti $(docker ps -ql) bash |
32 | 32 | curl localhost:8080/demo/Hello |
| 33 | + curl localhost:8080/demo/index.jsp |
33 | 34 | exit |
34 | 35 | docker stop $(docker ps -ql) |
35 | 36 |
|
36 | 37 | Then you can hit the the [HOSTNAME]:8080/demo/Hello and to verify that Tomcat is servering the demo.war file. You should see an html page that says "Hello World". The output should look similar: |
37 | 38 |
|
38 | 39 | $ docker run --rm -p 8080:8080 -d demo-java |
39 | | - 5ccc23ec07f2057ee530b9ad51714d4f07054d5c101ae407715aca33e5fffd69 |
| 40 | + 2ba7323481fa5c4068b90f2edf38555d9551303e9c2e4c27137ab0545688555b |
40 | 41 | $ docker exec -ti $(docker ps -ql) bash |
41 | | - root@5ccc23ec07f2:/usr/local/tomcat# curl localhost:8080/demo/Hello |
42 | | - <h1>Hello World</h1> |
43 | | - root@5ccc23ec07f2:/usr/local/tomcat# exit |
| 42 | + root@2ba7323481fa:/usr/local/tomcat# curl localhost:8080/demo/Hello |
| 43 | + <h1>Hello World Hello.java</h1> |
| 44 | + root@2ba7323481fa:/usr/local/tomcat# curl localhost:8080/demo/index.jsp |
| 45 | + <html> |
| 46 | + <body> |
| 47 | + <h2>Hello World index.jsp!</h2> |
| 48 | + </body> |
| 49 | + </html> |
| 50 | + root@2ba7323481fa:/usr/local/tomcat# exit |
44 | 51 | exit |
45 | 52 | $ docker stop $(docker ps -ql) |
46 | | - 5ccc23ec07f2 |
| 53 | + 2ba7323481fa |
47 | 54 | $ docker ps -a |
48 | 55 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
49 | 56 | $ |
|
Collapse file
Copy file name to clipboard Collapse file
Copy file name to clipboardExpand all lines: src/main/java/Hello.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -10,7 +10,7 @@ public class Hello extends HttpServlet { |
10 | 10 |
|
11 | 11 | public void init() throws ServletException { |
12 | 12 | // Do required initialization |
13 | | - message = "Hello World"; |
| 13 | + message = "Hello World Hello.java"; |
14 | 14 | } |
15 | 15 |
|
16 | 16 | public void doGet(HttpServletRequest request, HttpServletResponse response) |
|
Collapse file
Copy file name to clipboard +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | <html> |
2 | 2 | <body> |
3 | | -<h2>Hello World!</h2> |
| 3 | +<h2>Hello World index.jsp!</h2> |
4 | 4 | </body> |
5 | 5 | </html> |