This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build: NetBeans IDE 7.3 Beta (Build 201209201306) VM: Java HotSpot(TM) 64-Bit Server VM, 23.3-b01, Java(TM) SE Runtime Environment, 1.7.0_07-b11 OS: Windows 7 User Comments: jskrivanek: Need to handle exception when external web server is misconfigured: - create HTML5 project - open project properties - choose Run category - select External Web Server - type just "h" into Project URL - click OK - run project Stacktrace: java.net.MalformedURLException: no protocol: h/index.html at java.net.URL.<init>(URL.java:583) at java.net.URL.<init>(URL.java:480) at java.net.URL.<init>(URL.java:429) at org.netbeans.modules.web.clientproject.ServerURLMappingImpl.toServer(ServerURLMappingImpl.java:82) at org.netbeans.modules.web.clientproject.api.ServerURLMapping.toServer(ServerURLMapping.java:106) at org.netbeans.modules.web.clientproject.api.ServerURLMapping.toServer(ServerURLMapping.java:92)
Created attachment 124720 [details] stacktrace
Perhaps we should check whether entered value starts with "file:/" or "http:/" or "https:/"?
Or even better some regular expression for validating URL? Will fix it, let's start with just simple protocol validation.
At least catch the exception and provide user-friendly warning message.
Validation of project URL added to the project customizer. Jirko, could you please submit another issue for catching this exception for the Run action - assign it to me. Thanks. http://hg.netbeans.org/web-main/rev/78aa5fc903e7
Integrated into 'main-golden', will be available in build *201210210002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/78aa5fc903e7 User: Tomas Mysik <tmysik@netbeans.org> Log: #218780 - java.net.MalformedURLException: no protocol: h/index.html
Verified. Not clear what you mean by "catching this exception for the Run action". If it is not possible to set invalid url then exception never appears.
(In reply to comment #7) > If it is not possible to set invalid url then exception never appears. I just wanted to be sure that user will not see this exception, ever. I am fine with the current state.