4

Could you please point me towards some documentation about deploying web application which consists of html and javascript to an apache http server instance using Eclipse ?

1 Answer 1

8

Adapted to latest Apache 2.4 using the instructions here :

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

Publishing Static Content and JavaScript on Apache Server using Eclipse

Add Server

  1. Window -> Show View -> Servers
  2. Right click inside Servers tab
  3. New - > Server -> HTTP Server -> Next
  4. add publishing dir: in my case (C:\Program Files (x86)\Apache Group\Apache2\htdocs)
  5. Next -> add port (8080 in my case)

Create a web project

  1. Switch to Web View (Right hand top corner)
  2. Right click Project Explorer in left
  3. New -> Project -> Web -> Static Web Project
  4. Name the Project
  5. Select Runtime Target as HTTP Server
  6. Next -> Notice your default context root
  7. Finish

Copy your current js and html files in the 'WebContent' directory in Project Explorer.


In Servers Tab

  1. Right click HTTP Server
  2. Add - Remove -> Add your project -> Finish
  3. Right click Http Server -> Publish 4 done!

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

http://localhost:<port>/context_root

Also, this is a worthwhile read for this question.

1
  • Thanks a lot...!!:) It was of great help...:)
    – User_AA
    Aug 20, 2012 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.