title: java.net.MalformedURLException: For input string: "8080undefined" when run or debug Netbeans Java Project in Wildfly 15
body: <p>I have a JavaEE simple HelloWorld project developed using Netbeans. If I debug it or run it it works as expected in these situations (at least):</p>
  
  <pre><code>1) Netbeans 8.2 + Wildfly 12
  2) Netbeans 10 + Wildfly 12
  3) Netbeans 11 + Wildfly 12
  </code></pre>
  
  <p>but it fails (at least):</p>
  
  <pre><code>1) Netbeans 8.2 + Wildfly 15
  2) Netbeans 10 + Wildfly 15
  3) Netbeans 11 + Wildfly 15
  </code></pre>
  
  <p>The error shown when I try to run or debug using Wildfly 15 is:</p>
  
  <pre><code>Browsing: http://localhost:8080undefined/
  
  java.net.MalformedURLException: For input string: "8080undefined"
      at java.net.URL.&lt;init&gt;(URL.java:627)
      at java.net.URL.&lt;init&gt;(URL.java:490)
      at java.net.URL.&lt;init&gt;(URL.java:439)
      at org.netbeans.modules.ant.browsetask.NbBrowse.execute(NbBrowse.java:67)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
      at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
      at org.apache.tools.ant.Task.perform(Task.java:350)
      at org.apache.tools.ant.Target.execute(Target.java:449)
      at org.apache.tools.ant.Target.performTasks(Target.java:470)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
      at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:261)
      at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:574)
      at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:128)
  Caused by: java.lang.NumberFormatException: For input string: "8080undefined"
  </code></pre>
  
  <p>If I go deeper in the problem, it seems to be caused by wrong interpretation of ${client.url} on build-impl.xml, but I cannot figure out how to solve it.</p>
  
  <p>A workaround could be to add</p>
  
  <pre><code>&lt;target if="do.display.browser.debug" name="debug-display-browser"&gt;
          &lt;nbbrowse context="" url="http://localhost:8080/" urlPath="${client.urlPart}"/&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>at the end of build.xml on the project root, but I would like to know how to fix the origin of the problem.</p>
  
  <p>I have to say that the error is not blocking, that means that the project is successfully deployed, but the browser is not opened, what is somehow annoying. If I manually open the browser and write down the URL then everythings goes right.</p>
  
  <p>Kind regards</p>