• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Netbeans bundled Glassfish, which host, where defined

 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 fast.pfarrell.com,
I want the URL to be http://fast.pfarrell.com:8080/myapp/

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

Thanks
Pat
 
reply
    Bookmark Topic Watch Topic
  • New Topic