DEV Community

programmingMonky
programmingMonky

Posted on

3 1

glasshfishのインストールとサンプルアプリケーションのデプロイ方法の紹介について

本投稿ではjavaの代表的なアプリケーションサーバーであるGlassFishの導入とサンプルプロジェクトのデプロイを行います。

https://javaee.github.io/glassfish/download
にアクセスし、glassfishのダウンロードを行います。

https://thepracticaldev.s3.amazonaws.com/i/wakr53w6mxz6b1o1xb22.png

今回はfull platformを選択しました。

full

・c直下に解凍したのち、C:\glassfish5\bin に移動し、サーバーを起動するためのコマンド asadmin start-domain を実行



cd C:\glassfish5\bin
asadmin start-domain


Enter fullscreen mode Exit fullscreen mode

server

・サーバー起動後にブラウザで
http://localhost:4848
にアクセス。
正しく起動していればglassfishのメニューが表示されます

menu

・作成したwarファイル
C:\glassfish5\glassfish\domains\domain1\autodeploy
に配置し、
ブラウザから
http://localhost:8080/<作成したアプリケーション>

にアクセスするとアプリケーションが表示されます。

acess

正常にアクセスできました。

この手順で皆さんが作成したアプリケーションをサーバーにアップロードしてブラウザから閲覧できることができます。

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay