Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Netbeans bundled Glassfish, which host, where defined  RSS feed

Pat Farrell
Posts: 4686
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I debug my application, written in NetBeans and using the bundled Glassfish V2.x server, when the application starts, Netbeans fires up the browser.

The browser is fed the URL for the proper <Context path> in context.xml
All this works great.

Except that the hostname is always "localhost" which works, but makes testing on other devices, say an iPad, hard. So if my context is "/myapp"
then the URL is http://localhost:8080/myapp/

The computer that I'm developing on has a fixed IP and a name defined in the DNS system. What I want is to have the host name used, so if the host is,
I want the URL to be

This has to be some configuration parameter in either Netbeans or in Glassfish, but I can't find where. I can't even find anytihng close in the documentation or googling.

I assume in production contexts, the incoming URL for the HttpServletRequest is filled in. But for testing, I'd like it to look and feel real

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!