0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Javaを使ってブラウザに「HelloWorld」を表示させる

Posted at

■Javaを使ってブラウザに「HelloWorld」を表示させる
・Tomcatのインストールと設定
→インストールして、「startup.bat」を実行して、ブラウザのURL欄に http://localhost:8080をしても接続拒否をされた
→なんやかんやで環境変数の設定を変更
 参考URL)https://eng-entrance.com/java-servlet-tomcat-install
→再度、「startup.bat」を実行して、ブラウザのURL欄に http://localhost:8080にアクセスして成功
 猫の画像が表示された
 ※プロンプトのようなTomcatの黒画面が出てくるので閉じてはいけない
→その後、eclipsで「ファイル(F)-「その他(O)」-「動的Webプロジェクト」-適当にプロジェクト名を入れる
 -「Web-INF」と同じディレクトリーに「index.jsp」を入れとく※上の階層でF5-「ビューの表示(V)」-「その他」
 -「サーバー」-「開く」を選択-右クリックで新規(w)-「サーバー」-該当のサーバーを選択-使用したいプロジェクトを追加する
 -「完了」-ポートとかを変更させる-開始-http://localhost:<ポート番号>/プロジェクト名/
 ※1つのサーバしか「始動済み,同期済み」しかできない

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?