How to deploy html or javascript application on Apache HTTP server

Could you point out some documentation on deploying a web application that consists of html and javascript for an apache HTTP server instance using Eclipse?

+4
source share
1 answer

Adapted to the latest Apache 2.4 using the instructions here :

Requirements: Apache Server (I downloaded v2.4 from here )

Publish Static Content and JavaScript on an Apache Server Using Eclipse

Add Server

  • Window -> Show View -> Servers
  • Right click inside the Servers tab
  • New β†’ Server β†’ HTTP Server β†’ Next
  • add publication directory: in my case ( C:\Program Files (x86)\Apache Group\Apache2\htdocs )
  • Next β†’ add port (8080 in my case)

Web project creation

  1. Switch to web view (upper right corner)
  2. Right-click Project Explorer on the left.
  3. New β†’ Project β†’ Web β†’ Static Web Project
  4. Name the project
  5. Select the target runtime resource as the HTTP server.
  6. Next β†’ Pay attention to your default root context
  7. Done

Copy the current js and html files into the "WebContent" directory in Project Explorer.


Servers Tab

  • Right click HTTP Server
  • Add - Delete β†’ Add Project β†’ Done
  • Right-click Http Server -> Publish 4 done!

You should be able to see your stuff in the publication directory. you can access the page in

http://localhost:<port>/context_root

Also, this is worth reading for this question.

+8
source

All Articles