7

When I try to create a web page with eclipse, I have two options
-- Javascript project
-- Static web project

If I choose the former, then configuring run to launch a web browser seems to be difficult.
If I choose the later, I lose support for JavaScript.

So, how do I get the best of both?

4
  • Use static web project and install your browsers debugging plugin (e.g. firebug for Mozilla firefox) to do the debugging of your js-code Commented May 31, 2013 at 9:04
  • But the reason I want javascript support in eclipse, is to take advantage of code-completion and as such Commented May 31, 2013 at 9:06
  • There is a plugin for eclipse that provides just that. Wait a moment please ... Commented May 31, 2013 at 9:08
  • Ok, I use a jsp editor, which is propably more, than you really need. But there should be an editor with js-code completion in the web tools project (WTP) plugin or its successor. Commented May 31, 2013 at 9:35

1 Answer 1

7

I have been using the 'static web project' option, and I am including HTML, JavaScript and PHP files in the project.

Make sure you include your .js files in your .html document, otherwise check your eclipse software is up to date to ensure you are getting JavaScript support.

http://wiki.eclipse.org/Eclipse_Project_Update_Sites

sorry would have put this in a comment, but I think I need more reputation.

Sign up to request clarification or add additional context in comments.

3 Comments

did any of these links provide what you were looking for Karthik?
Hi guys. Sorry, was out the whole weekend. Using a static web project was perfectly fine. I was skeptical whether this will have javascript support, but all javascript files are being open in Javascript editor anyways. so, problem solved.
After creating Static Web Project - what would be the file extension of file I would add. Is it .html or what?

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.