-
Notifications
You must be signed in to change notification settings - Fork 138
/
quickstart.html
710 lines (631 loc) · 30.8 KB
/
quickstart.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<!--
Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2023 Contributors to the Eclipse Foundation.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<head>
<style type="text/css">
body{margin-top:0}
body,td,p,div,span,a,ul,ul li, ol, ol li, ol li b, dl,h1,h2,h3,h4,h5,h6,li {font-family:geneva,helvetica,arial,"lucida sans",sans-serif; font-size:10pt}
h1 {font-size:18pt}
h2 {font-size:14pt}
h3 {font-size:12pt}
code,kbd,tt,pre {font-family:monaco,courier,"courier new"; font-size:10pt;}
p.copy, p.copy a {font-family:geneva,helvetica,arial,"lucida sans",sans-serif; font-size:8pt}
p.copy {text-align: center}
table.grey1,tr.grey1,td.grey1{background:#f1f1f1}
th {color:#ffffff; font-family:geneva,helvetica,arial,"lucida sans",sans-serif; font-size:12pt}
td.insidehead {font-weight:bold; background:white; text-align: left;}
a {text-decoration:none; color:#3E6B8A}
a:visited{color:#917E9C}
a:hover {text-decoration:underline}
</style>
<title>GlassFish Server 7 Quick Start Guide</title>
</head>
<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
link="#594fbf" vlink="#1005fb" alink="#333366"><table width="100%" border="0"
cellspacing="4" cellpadding="2">
<tbody>
<tr>
<td align="right" valign="top"> <a href="https://glassfish.org/">glassfish.org</a> </td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#587993"> <font color="#ffffff"><b>GlassFish Server 7</b></font></td>
</tr>
</tbody>
</table><div class="maincontent">
<a name="aboaa"></a><h1>GlassFish Server 7 Quick Start Guide</h1>
<p>GlassFish Server provides a server for the development and deployment of Jakarta EE Platform applications
and web technologies based on Java technology. GlassFish Server 7 provides the following:</p>
<ul>
<li><p>A lightweight and extensible core based on OSGi Alliance standards</p></li>
<li><p>A web container</p></li>
<li><p>An easy-to-use Administration Console for configuration and management</p></li>
</ul>
<p>The following topics are addressed here:</p>
<ul>
<li><p><a href="#ghgpe">About This Quick Start Guide</a></p></li>
<li><p><a href="#ghpfg">Default Paths and File Names</a></p></li>
<li><p><a href="#gixue">Default Administration Values</a></p></li>
<li><p><a href="#gglog">Starting and Stopping the Default Domain</a></p></li>
<li><p><a href="#gglmh">Starting and Stopping the Database Server</a></p></li>
<li><p><a href="#ggllq">Starting the Administration Console</a></p></li>
<li><p><a href="#geyvr">Deploying and Undeploying Applications</a></p></li>
<li><p><a href="#ghgqg">Removing GlassFish Server 7 Software</a></p></li>
<li><p><a href="#ggkzh">For More Information</a></p></li>
</ul>
<a id="ghgpe" name="ghgpe"></a><a id="GSQSG00030" name="GSQSG00030"></a>
<h2>About This Quick Start Guide</h2>
<p>This <i>Quick Start Guide</i> demonstrates key features of GlassFish Server and enables you to quickly learn the basics.
Step-by-step procedures introduce you to product features and enable you to use them immediately.</p>
<p>This guide assumes that you have already obtained and installed the GlassFish Server 7 software. For more information
about installing GlassFish Server 7, see the <a href="https://glassfish.org/docs/latest/installation-guide.html"><cite>Installation Guide</cite></a>.</p>
<p>Instructions and examples in this guide that apply to all supported operating systems use the forward slash character
(<code>/</code>) as path separators in all file names and commands. Ensure that you use the correct character for the
system on which GlassFish Server is installed. For example:</p>
<ul>
<li><p><b>UNIX, Linux, or Mac OS X systems:</b> <i>as-install</i><code>/bin/asadmin</code></p></li>
<li><p><b>Windows systems:</b> <i>as-install</i><code>\bin\asadmin</code></p></li>
</ul>
<p>This guide provides basic information only. For comprehensive information about GlassFish Server and
other entities mentioned in this guide, see <a href="#ggkzh">For More Information</a>.</p>
<p>To review additional details about this release before you begin using the software,
see the <a href="https://glassfish.org/docs/latest/release-notes.html"><cite>Release Notes</cite></a>.
The <i>Release Notes</i> provide important information about the GlassFish Server 7 release,
including details about new features, information about known issues and possible workarounds,
and tips for installing and working with GlassFish Server 7 software.</p>
<a id="ghpfg" name="ghpfg"></a><a id="GSQSG00031" name="GSQSG00031"></a>
<h2>Default Paths and File Names</h2>
<p>The following table describes the default paths and file names that are used in this book.</p>
<a id="sthref2" name="sthref2"></a><a id="sthref3" name="sthref3"></a>
<p><b>Table 1-1 Default Paths and File Names</b></p>
<table title="Default Paths and File Names" summary="Explanation of the placeholders for denoting default paths and file names." dir="ltr" border="1" width="100%" frame="hsides" rules="rows" cellpadding="3" cellspacing="0">
<col width="14%" />
<col width="35%" />
<col width="*" />
<thead>
<tr align="left" valign="top">
<th align="left" valign="bottom" id="r1c1-t2">Placeholder</th>
<th align="left" valign="bottom" id="r1c2-t2">Description</th>
<th align="left" valign="bottom" id="r1c3-t2">Default Value</th>
</tr>
</thead>
<tbody>
<tr align="left" valign="top">
<td align="left" id="r2c1-t2" headers="r1c1-t2">
<p><i>as-install</i></p>
<br /></td>
<td align="left" headers="r2c1-t2 r1c2-t2">
<p>Represents the base installation directory for GlassFish Server.</p>
<p>In configuration files, <i>as-install</i> is represented as follows:</p>
<p><code>${com.sun.aas.installRoot}</code></p>
</td>
<td align="left" headers="r2c1-t2 r1c3-t2">
<p>Installations on the Oracle Solaris operating system, Linux operating system, and Mac OS operating system:</p>
<p><i>user's-home-directory</i><code>/glassfish7/glassfish</code></p>
<p>Installations on the Windows operating system:</p>
<p><i>SystemDrive</i><code>:\glassfish7\glassfish</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r3c1-t2" headers="r1c1-t2">
<p><i>as-install-parent</i></p>
<br /></td>
<td align="left" headers="r3c1-t2 r1c2-t2">
<p>Represents the parent of the base installation directory for GlassFish Server.</p>
</td>
<td align="left" headers="r3c1-t2 r1c3-t2">
<p>Installations on the Oracle Solaris operating system, Linux operating system, and Mac operating system:</p>
<p><i>user's-home-directory</i><code>/glassfish7</code></p>
<p>Installations on the Windows operating system:</p>
<p><i>SystemDrive</i><code>:\glassfish7</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5.0-t2" headers="r1c1-t2">
<p><i>domain-root-dir</i></p>
<br /></td>
<td align="left" headers="r5.0-t2 r1c2-t2">
<p>Represents the directory in which a domain is created by default.</p>
</td>
<td align="left" headers="r5.0-t2 r1c3-t2">
<p><i>as-install</i><code>/domains/</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5c1-t2" headers="r1c1-t2">
<p><i>domain-dir</i></p>
<br /></td>
<td align="left" headers="r5c1-t2 r1c2-t2">
<p>Represents the directory in which a domain's configuration is stored.</p>
<p>In configuration files, <i>domain-dir</i> is represented as follows:</p>
<p><code>${com.sun.aas.instanceRoot}</code></p>
</td>
<td align="left" headers="r5c1-t2 r1c3-t2">
<p><i>domain-root-dir</i><code>/</code><i>domain-name</i></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r6c1-t2" headers="r1c1-t2">
<p><i>instance-dir</i></p>
<br /></td>
<td align="left" headers="r6c1-t2 r1c2-t2">
<p>Represents the directory for a server instance.</p>
</td>
<td align="left" headers="r6c1-t2 r1c3-t2">
<p><i>domain-dir</i><code>/</code><i>instance-name</i></p>
</td>
</tr>
</tbody>
</table>
<br />
<a id="gixue" name="gixue"></a><a id="GSQSG00032" name="GSQSG00032"></a>
<h2>Default Administration Values</h2>
<p>The following table lists default administration values for GlassFish Server.
See <a href="#ghpfg">Default Paths and File Names</a> for more information
about the <i>as-install</i> and <i>domain-dir</i> placeholders.</p>
<a id="sthref4" name="sthref4"></a><a id="gixxy" name="gixxy"></a>
<p><b>Table 1-2 Default Administration Values</b></p>
<table title="Default Administration Values" summary="Summary of default paths and port numbers for administration." dir="ltr" border="1" width="100%" frame="hsides" rules="rows" cellpadding="3" cellspacing="0">
<col width="*" />
<col width="50%" />
<thead>
<tr align="left" valign="top">
<th align="left" valign="bottom" id="r1c1-t3">Item</th>
<th align="left" valign="bottom" id="r1c2-t3">Default Value or Location</th>
</tr>
</thead>
<tbody>
<tr align="left" valign="top">
<td align="left" id="r2c1-t3" headers="r1c1-t3">
<p>Domain name</p>
</td>
<td align="left" headers="r2c1-t3 r1c2-t3">
<p><code>domain1</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r3c1-t3" headers="r1c1-t3">
<p>Master password</p>
</td>
<td align="left" headers="r3c1-t3 r1c2-t3">
<p><code>changeit</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5.0-t3" headers="r1c1-t3">
<p><code>asadmin</code> command-line utility</p>
</td>
<td align="left" headers="r5.0-t3 r1c2-t3">
<p><i>as-install</i><code>/bin</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5c1-t3" headers="r1c1-t3">
<p>Configuration files</p>
</td>
<td align="left" headers="r5c1-t3 r1c2-t3">
<p><i>domain-dir</i><code>/config</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r6c1-t3" headers="r1c1-t3">
<p>Log files</p>
</td>
<td align="left" headers="r6c1-t3 r1c2-t3">
<p><i>domain-dir</i><code>/logs</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r7c1-t3" headers="r1c1-t3">
<p>Administration server port</p>
</td>
<td align="left" headers="r7c1-t3 r1c2-t3">
<p><code>4848</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r8c1-t3" headers="r1c1-t3">
<p>HTTP port</p>
</td>
<td align="left" headers="r8c1-t3 r1c2-t3">
<p><code>8080</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r9c1-t3" headers="r1c1-t3">
<p>HTTPS port</p>
</td>
<td align="left" headers="r9c1-t3 r1c2-t3">
<p><code>8181</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r10c1-t3" headers="r1c1-t3">
<p>Pure JMX clients port</p>
</td>
<td align="left" headers="r10c1-t3 r1c2-t3">
<p><code>8686</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r11c1-t3" headers="r1c1-t3">
<p>Message Queue port</p>
</td>
<td align="left" headers="r11c1-t3 r1c2-t3">
<p><code>7676</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r12c1-t3" headers="r1c1-t3">
<p>IIOP port</p>
</td>
<td align="left" headers="r12c1-t3 r1c2-t3">
<p><code>3700</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r13c1-t3" headers="r1c1-t3">
<p>IIOP/SSL port</p>
</td>
<td align="left" headers="r13c1-t3 r1c2-t3">
<p><code>3820</code></p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r15.0-t3" headers="r1c1-t3">
<p>IIOP/SSL port with mutual authentication</p>
</td>
<td align="left" headers="r15.0-t3 r1c2-t3">
<p><code>3920</code></p>
</td>
</tr>
</tbody>
</table>
<br />
<a id="gglog" name="gglog"></a><a id="GSQSG00033" name="GSQSG00033"></a>
<h2>Starting and Stopping the Default Domain</h2>
<p>When you install GlassFish Server, a default domain named <code>domain1</code> is created.
The following procedures describe how to start and stop <code>domain1</code>
when it is the only domain.
For information about starting and stopping a domain when there are multiple domains,
see <i>Administering Domains</i> in <a href="https://glassfish.org/docs/latest/administration-guide.html">
<i>Eclipse GlassFish Administration Guide</i></a>.</p>
<a id="ggmpd" name="ggmpd"></a><a id="GSQSG00005" name="GSQSG00005"></a>
<h3>To Start the Default Domain</h3>
<a id="sthref5" name="sthref5"></a>
<h6>Before You Begin</h6>
<p>GlassFish Server software must be installed before you start the domain.</p>
<p>Run the <code>asadmin start-domain</code> command without an operand:</p>
<pre>
<b><i>as-install</i>/bin/asadmin start-domain</b>
</pre>
<p>The command starts the default domain, <code>domain1</code>.</p>
<a id="ggmsx" name="ggmsx"></a><a id="GSQSG00006" name="GSQSG00006"></a>
<h3>To Stop the Default Domain</h3>
<p>Run the <code>asadmin stop-domain</code> command without an operand:</p>
<pre>
<b><i>as-install</i>/bin/asadmin stop-domain</b>
</pre>
<p>The command stops the default domain, <code>domain1</code>.</p>
<br />
<p><b>Tip:</b></p>
<p>To determine whether a domain is running, use the <code>asadmin list-domains</code> command:</p>
<pre>
<b><i>as-install</i>/bin/asadmin list-domains</b>
</pre>
<br />
<a id="gglmh" name="gglmh"></a><a id="GSQSG00034" name="GSQSG00034"></a>
<h2>Starting and Stopping the Database Server</h2>
<p>A database server is not started by default when you start the GlassFish Server domain.
If your applications require a database back end, you must start and stop the database server manually.</p>
<p>The following procedures describe how to start and stop the Java DB server that is bundled with GlassFish Server.
For information about starting and stopping other database servers, see the documentation for your specific product.</p>
<p>For the list of database products supported in this release,
see the <a href="https://glassfish.org/docs/latest/release-notes.html"><cite>Release Notes</cite></a>.</p>
<p>For more information about database connectivity, see <i>Administering Database Connectivity,</i>
in <a href="https://glassfish.org/docs/latest/administration-guide.html"><i>Eclipse GlassFish Administration Guide</i></a>.</p>
<a id="ggncr" name="ggncr"></a><a id="GSQSG00007" name="GSQSG00007"></a>
<h3>To Start the Java DB Server</h3>
<a id="sthref6" name="sthref6"></a>
<h6>Before You Begin</h6>
<p>At least one GlassFish Server domain must be started before you start the database server.</p>
<p>Run the <code>asadmin start-database</code> command.</p>
<p>The general form for the command is as follows:</p>
<pre>
<i>as-install</i>/bin/asadmin start-database --dbhome <i>directory-path</i>
</pre>
<p>For example, to start the Java DB server from its default location:</p>
<pre>
<b><i>as-install</i>/bin/asadmin start-database --dbhome <i>as-install-parent</i>/javadb</b>
</pre>
<a id="ggnez" name="ggnez"></a><a id="GSQSG00008" name="GSQSG00008"></a>
<h3>To Stop the Java DB Server</h3>
<p>Run the <code>asadmin stop-database</code> command:</p>
<pre>
<b><i>as-install</i>/bin/asadmin stop-database</b>
</pre>
<a id="ggllq" name="ggllq"></a><a id="GSQSG00035" name="GSQSG00035"></a>
<h2>Starting the Administration Console</h2>
<p>The GlassFish Server Administration Console provides a browser interface for configuring, administering, and monitoring GlassFish Server.</p>
<a id="ggnbp" name="ggnbp"></a><a id="GSQSG00009" name="GSQSG00009"></a>
<h3>To Start the Administration Console</h3>
<a id="sthref7" name="sthref7"></a>
<h6>Before You Begin</h6>
<p>At least one GlassFish Server domain must be started.</p>
<ol>
<li><p>Type the URL in your browser.</p>
<p>The default URL for the Administration Console on the local host is as follows:</p>
<pre>
<b>http://localhost:4848</b>
</pre></li>
<li><p>If prompted, log in to the Administration Console.</p>
<p>You will be prompted to log in if you chose to require an administration password at the time GlassFish Server was installed.</p></li>
</ol>
<a id="sthref8" name="sthref8"></a>
<h6>See Also</h6>
<p>For more information, see the Administration Console online help.</p>
<a id="geyvr" name="geyvr"></a><a id="GSQSG00036" name="GSQSG00036"></a>
<h2>Deploying and Undeploying Applications</h2>
<p>The process of configuring and enabling applications to run within the GlassFish Server framework is referred to as deployment.</p>
<p>This section explains how to deploy, list, and undeploy applications. The procedures in this section use the <code>hello.war</code>
sample application. The following topics are addressed here:</p>
<ul>
<li><p><a href="#ghgis">To Obtain the Sample Application</a></p></li>
<li><p><a href="#gkpao">Deploying and Undeploying the Sample Application From the Command Line</a></p></li>
<li><p><a href="#gkpau">Deploying and Undeploying Applications by Using the Administration Console</a></p></li>
<li><p><a href="#gkpaa">Deploying and Undeploying the Sample Application Automatically</a></p></li>
</ul>
<a id="ghgis" name="ghgis"></a><a id="GSQSG00010" name="GSQSG00010"></a>
<h3>To Obtain the Sample Application</h3>
<ol>
<li><p>Download a copy of the <code>hello.war</code> sample application from
<code><a href="https://javaee.github.io/glassfish/downloads/quickstart/hello.war">https://javaee.github.io/glassfish/downloads/quickstart/hello.war</a></code>.</p></li>
<li><p>Save the <code>hello.war</code> file in the directory of your choice.</p>
<p>This directory is referred to as <i>sample-dir</i>.</p></li>
</ol>
<a id="gkpao" name="gkpao"></a><a id="GSQSG00044" name="GSQSG00044"></a>
<h3>Deploying and Undeploying the Sample Application From the Command Line</h3>
<p>GlassFish Server provides <code>asadmin</code> subcommands for performing the following deployment-related tasks:</p>
<ul>
<li><p><a href="#ggndq">To Deploy the Sample Application From the Command Line</a></p></li>
<li><p><a href="#ggnco">To List Deployed Applications From the Command Line</a></p></li>
<li><p><a href="#ggnbm">To Undeploy the Sample Application From the Command Line</a></p></li>
</ul>
<a id="ggndq" name="ggndq"></a><a id="GSQSG00011" name="GSQSG00011"></a>
<h4>To Deploy the Sample Application From the Command Line</h4>
<a id="sthref9" name="sthref9"></a>
<h6>Before You Begin</h6>
<p>The sample application must be available before you start this task. To download the sample,
see <a href="#ghgis">To Obtain the Sample Application</a>. At least one GlassFish Server domain
must be started before you deploy the sample application.</p>
<ol>
<li><p>Run the <code>asadmin deploy</code> command.</p>
<p>The general form for the command is as follows:</p>
<pre>
<i>as-install</i>/bin/asadmin deploy <i>war-name</i>
</pre>
<p>To deploy the <code>hello.war</code> sample, the command is as follows:</p>
<pre>
<b><i>as-install</i>/bin/asadmin deploy </b><code><b><i>sample-dir</i></b></code><b>/hello.war</b>
</pre></li>
<li><p>Access the <code>hello</code> application by typing the following URL in your browser:</p>
<pre>
<b>http://localhost:8080/hello</b>
</pre>
<p>The application's start page is displayed, and you are prompted to type your name.</p>
<pre>
Hi, my name is Duke. What's yours?
</pre></li>
<li><p>Type your name and click Submit.</p>
<p>The application displays a customized response, giving you a personal <code>Hello</code>.</p></li>
</ol>
<a id="sthref10" name="sthref10"></a>
<h6>See Also</h6>
<p>For more information about deploying applications from the command line,
see <a href="https://glassfish.org/docs/latest/application-deployment-guide.html"><i>GlassFish Server Application Deployment Guide</i></a>.</p>
<a id="ggnco" name="ggnco"></a><a id="GSQSG00012" name="GSQSG00012"></a>
<h4>To List Deployed Applications From the Command Line</h4>
<p>Run the <code>asadmin list-applications</code> command:</p>
<pre>
<b><i>as-install</i>/bin/asadmin list-applications</b>
</pre>
<a id="ggnbm" name="ggnbm"></a><a id="GSQSG00013" name="GSQSG00013"></a>
<h4>To Undeploy the Sample Application From the Command Line</h4>
<p>Run the <code>asadmin undeploy</code> command.</p>
<p>The general form for the command is as follows:</p>
<pre>
<i>as-install</i>/bin/asadmin undeploy <i>war-name</i>
</pre>
<p>For <i>war-name</i>, use the literal <code>hello</code>, not the full <code>hello.war</code> name.</p>
<p>For the <code>hello.war</code> example, the command is as follows:</p>
<pre>
<b><i>as-install</i>/bin/asadmin undeploy hello</b>
</pre>
<a id="sthref11" name="sthref11"></a>
<a id="gkpau" name="gkpau"></a><a id="GSQSG00045" name="GSQSG00045"></a>
<h3>Deploying and Undeploying Applications by Using the Administration Console</h3>
<p>The graphical Administration Console of GlassFish Server enables you to perform the following deployment-related tasks:</p>
<ul>
<li><p><a href="#ggnbn">To Deploy the Sample Application by Using the Administration Console</a></p></li>
<li><p><a href="#ggncd">To View Deployed Applications in the Administration Console</a></p></li>
<li><p><a href="#ggneh">To Undeploy the Sample Application by Using the Administration Console</a></p></li>
</ul>
<a id="ggnbn" name="ggnbn"></a><a id="GSQSG00014" name="GSQSG00014"></a>
<h4>To Deploy the Sample Application by Using the Administration Console</h4>
<a id="sthref12" name="sthref12"></a>
<h6>Before You Begin</h6>
<p>The sample application must be available before you start this task. To download the sample,
see <a href="#ghgis">To Obtain the Sample Application</a>. At least one GlassFish Server domain
must be started before you deploy the sample application.</p>
<ol>
<li><p>Launch the Administration Console by typing the following URL in your browser:</p>
<pre>
<b>http://localhost:4848</b>
</pre></li>
<li><p>Click the Applications node in the tree on the left.</p>
<p>The Applications page is displayed.</p></li>
<li><p>Click the Deploy button.</p>
<p>The Deploy Applications or Modules page is displayed.</p></li>
<li><p>Select Packaged File to be Uploaded to the Server, and click Browse.</p></li>
<li><p>Navigate to the location in which you saved the <code>hello.war</code> sample, select the file, and click Open.</p>
<p>You are returned to the Deploy Applications or Modules page.</p></li>
<li><p>Specify a description in the Description field, for example:</p>
<p><code>hello</code></p></li>
<li><p>Accept the other default settings, and click OK.</p>
<p>You are returned to the Applications page.</p></li>
<li><p>Select the check box next to the <code>hello</code> application and click the Launch link to run the application.</p>
<p>The default URL for the application is as follows:</p>
<pre>
<b>http://localhost:8080/hello/</b>
</pre></li>
</ol>
<a id="sthref13" name="sthref13"></a>
<h6>See Also</h6>
<p>For more information, see the Administration Console online help.</p>
<a id="ggncd" name="ggncd"></a><a id="GSQSG00015" name="GSQSG00015"></a>
<h4>To View Deployed Applications in the Administration Console</h4>
<ol>
<li><p>Launch the Administration Console by typing the following URL in your browser:</p>
<pre>
<b>http://localhost:4848</b>
</pre></li>
<li><p>Click the Applications node in the tree on the left.</p>
<p>Expand the node to list deployed applications. Deployed applications are also listed in the table on the Applications page.</p></li>
</ol>
<a id="ggneh" name="ggneh"></a><a id="GSQSG00016" name="GSQSG00016"></a>
<h4>To Undeploy the Sample Application by Using the Administration Console</h4>
<ol>
<li><p>Launch the Administration Console by typing the following URL in your browser:</p>
<pre>
<b>http://localhost:4848</b>
</pre></li>
<li><p>Click the Applications node in the tree on the left.</p>
<p>The Applications page is displayed.</p></li>
<li><p>Select the check box next to the <code>hello</code> sample application.</p></li>
<li><p>Remove or disable the application.</p>
<ul>
<li><p>To remove the application, click the Undeploy button.</p></li>
<li><p>To disable the application, click the Disable button.</p></li>
</ul>
</li>
</ol>
<a id="sthref14" name="sthref14"></a>
<h6>See Also</h6>
<p>For more information, see the Administration Console online help.</p>
<a id="gkpaa" name="gkpaa"></a><a id="GSQSG00046" name="GSQSG00046"></a>
<h3>Deploying and Undeploying the Sample Application Automatically</h3>
<p>GlassFish Server enables you to performing the following deployment-related tasks automatically:</p>
<ul>
<li><p><a href="#geyvj">To Deploy the Sample Application Automatically</a></p></li>
<li><p><a href="#ggncw">To Undeploy the Sample Application Automatically</a></p></li>
</ul>
<a id="geyvj" name="geyvj"></a><a id="GSQSG00017" name="GSQSG00017"></a>
<h4>To Deploy the Sample Application Automatically</h4>
<p>You can deploy applications automatically by placing them in the <i>domain-dir</i><code>/autodeploy</code>
directory, where <i>domain-dir</i> is the directory of the domain for which you want to configure automatic deployment.
For this example, use the default domain, <code>domain1</code>, in the default <i>domain-root-dir</i>, which is <i>as-install</i><code>/domains</code>:</p>
<pre>
<i>as-install</i>/domains/domain1/autodeploy
</pre>
<a id="sthref15" name="sthref15"></a>
<h6>Before You Begin</h6>
<p>The sample application must be available before you start this task. To download the sample, see <a href="#ghgis">To Obtain the Sample Application</a>.</p>
<p>Copy the application WAR file to the <i>domain-dir</i><code>/autodeploy</code> directory.</p>
<ul>
<li><p>On UNIX, Linux, and Mac OS X systems, type this command:</p>
<pre>
<b>cp </b><code><b><i>sample-dir</i></b></code><b>/hello.war <i>as-install</i>/domains/<i>domain-dir</i>/autodeploy</b>
</pre></li>
<li><p>On Windows systems, type this command:</p>
<pre>
<b>copy </b><code><b><i>sample-dir</i></b></code><b>\hello.war <i>as-install</i>\domains\<i>domain-dir</i>\autodeploy</b>
</pre></li>
</ul>
<p>GlassFish Server automatically discovers and deploys the application. The default URL for the application is as follows:</p>
<pre>
<b>http://localhost:8080/hello/</b>
</pre>
<a id="ggncw" name="ggncw"></a><a id="GSQSG00018" name="GSQSG00018"></a>
<h4>To Undeploy the Sample Application Automatically</h4>
<ol>
<li><p>Change to the domain's <code>autodeploy</code> directory.</p>
<pre>
<b>cd <i>as-install</i>\domains\<i>domain-dir</i>\autodeploy</b>
</pre></li>
<li><p>Delete the sample application's WAR file to undeploy and remove the application.</p>
<ul>
<li><p>On UNIX, Linux, and Mac OS X systems, type this command:</p>
<pre>
<b>rm hello.war</b>
</pre></li>
<li><p>On Windows systems, type this command:</p>
<pre>
<b>del hello.war</b>
</pre></li>
</ul>
</li>
</ol>
<a id="ghgqg" name="ghgqg"></a><a id="GSQSG00039" name="GSQSG00039"></a>
<h2>Removing GlassFish Server 7 Software</h2>
<p>Before removing the GlassFish Server software, stop the following processes:</p>
<ul>
<li><p>All domains and other related processes</p></li>
<li><p>Command prompts that use the installation directory or its subdirectories</p></li>
<li><p>Any applications that use files that are part of the Java Platform, Standard Edition (Java SE)</p></li>
</ul>
<p>You can then remove the <i>as-install-parent directory</i> </p>
<a id="ggrkk" name="ggrkk"></a><a id="GSQSG00021" name="GSQSG00021"></a>
<a id="ggkzh" name="ggkzh"></a><a id="GSQSG00040" name="GSQSG00040"></a>
<h2>For More Information</h2>
<p>Additional resources are available to help you learn more about GlassFish Server 7 and related technologies.</p>
<p>The following resources are described here:</p>
<ul>
<li><p><a href="#ghhir">Product Documentation</a></p></li>
<li><p><a href="#ghhis">GlassFish Community</a></p></li>
<li><p><a href="#giyjo">Tutorials</a></p></li>
<li><p><a href="#gintm">Jakarta EE Tutorial Samples</a></p></li>
<li><p><a href="#gkoun">Jakarta EE Samples</a></p></li>
<li><p><a href="#glpvo">GlassFish Samples</a></p></li>
</ul>
<a id="ghhir" name="ghhir"></a><a id="GSQSG00050" name="GSQSG00050"></a>
<h3>Product Documentation</h3>
<p>Comprehensive product documentation is available and includes the following.</p>
<ul>
<li><p><a href="https://glassfish.org/docs/latest/release-notes.html"><cite>Release Notes</cite></a>: Latest details about new features, known issues, and tips for installing and working with GlassFish Server software.</p></li>
<li><p>The <a href="https://glassfish.org/documentation">GlassFish Product Documentation</a> page: Collection of guides that document GlassFish Server Open Source Edition features and functions.</p></li>
</ul>
<a id="ghhis" name="ghhis"></a><a id="GSQSG00051" name="GSQSG00051"></a>
<h3>GlassFish Community</h3>
<ul>
<li><p><a href="https://www.eclipse.org/forums/index.php/f/419/">GlassFish Forum</a>: Public online discussion forum that provides community support and tips for working with GlassFish Server.</p></li>
</ul>
<a id="giyjo" name="giyjo"></a><a id="GSQSG00052" name="GSQSG00052"></a>
<h3>Tutorials</h3>
<p>The following tutorials provide working examples and detailed instructions for creating enterprise applications for the Jakarta EE Platform 10.</p>
<ul>
<li><p><a href="https://eclipse-ee4j.github.io/jakartaee-firstcup">Your First Cup: An Introduction to the Jakarta EE Platform</a>: Provides a short tutorial for beginning Jakarta EE programmers that shows how to develop a simple enterprise application from scratch. The sample application consists of four main components: a Jakarta RESTful web service, an enterprise bean, a Jakarta Persistence entity, and a web application created with Jakarta Faces Facelets technology.</p></li>
<li><p><a href="https://eclipse-ee4j.github.io/jakartaee-tutorial">The Jakarta EE Tutorial</a>: Provides a beginner's guide to developing enterprise applications for GlassFish Server. The tutorial includes working examples and instructions for creating applications with Jakarta EE technologies, including Jakarta Servlets, Jakarta Faces Facelets, Jakarta RESTful Web Services, Jakarta Enterprise Beans, Jakarta Persistence, Jakarta Contexts and Dependency Injection for the Jakarta EE Platform, and more.</p></li>
</ul>
<a id="gintm" name="gintm"></a><a id="GSQSG00053" name="GSQSG00053"></a>
<h3>Jakarta EE Tutorial Samples</h3>
<p>The sample applications used by Jakarta EE Tutorial. The samples are available from the <a href="https://github.com/eclipse-ee4j/jakartaee-tutorial-examples">Jakarta EE Tutorisl samples downloads page</a>.</p>
<a id="gkoun" name="gkoun"></a><a id="GSQSG00054" name="GSQSG00053"></a>
<h3>Jakarta EE Samples</h3>
<p>The sample applications demonstrate Jakarta EE technologies. The samples are available from the <a href="https://github.com/eclipse-ee4j/jakartaee-examples">Jakarta EE samples downloads page</a>.</p>
<a id="glpvo" name="glpvo"></a><a id="GSQSG00055" name="GSQSG00053"></a>
<h3>GlassFish Samples</h3>
<p>The sample applications that are delivered with older Java EE SDK. The samples are available from the <a href="https://github.com/eclipse-ee4j/glassfish-samples">GlassFish samples downloads page</a>.</p>
</div> <hr style="width: 80%; height: 2px;"> <p
class="copy">Copyright © 2023 Eclipse Foundation | <a
href="./copyright.html">Legal Notices</a></p></body></html>