Found at :http://stackoverflow.com/questions/8535144/eclipse-publish-run-simple-web-project
Add Server
- Window -> Show View -> Servers
- Right click inside servers tab
- New - > Server -> HTTP Server -> Next
- add publishing dir: in my case (C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs)
- Next -> add port (12345 in my case)
Create a web project
- Switch to Web View (Right hand top corner)
- Right click Project Explorer in left
- New -> Project -> Web -> Static Web Project
- Name the Project
- Select Runtime Target as HTTP Server
- Next -> Notice your default context root
- Finish
Copy your current js and html files in the 'WebContent' directory in Project Explorer.
In Servers Tab
- Right click HTTP Server
- Add - Remove -> Add your project -> Finish
- 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:/context_root
cheers!
No comments:
Post a Comment