简体   繁体   中英

netbeans project doesn't start web server

I have 2 HTML5 projects. One runs on http://localhost:8383 when I click on run. The other runs on file:/// and (correctly) shows a "Cross origin request" error when loading a json file.

Both projects are relatively simple html+css+vanilla javascript projects. I compared both projects carefully. Specifically, I compared the project properties. "Sources", "JavaScript" and "Run" appear to be identical. Both projects are set to "With Netbeans Connector", "Chrome", but I tested both with the embedded Webkit Browser as well.

Whatever I try, when I click on "Run", one projects starts as http://, as it should, the other insists to start as "file:///".

Does anyone have an idea where I should look?

EDIT: Things I tried:

  • Triple-checking Run configuration settings
  • Restarting Netbeans
  • Starting one project first, then the other
  • Testing both projects with Chrome and the embedded Webkit browser

Thanks in advance.

My solution was to create a new project and copy all source files over. Now the play button calls the web service.

I faced a similar issue and solved it. I created an HTML5 project using an Oracle JET template. The issue is with the template which is being used while creating the project. Re-created the project by attaching a different template (older version of oracle jet library) and also created another without attaching any template and it works successfully. It looks like some compatibility issue between netbeans and the attached template!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM