File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Netbeans bundled Glassfish, which host, where defined Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Netbeans bundled Glassfish, which host, where defined" Watch "Netbeans bundled Glassfish, which host, where defined" New topic
Author

Netbeans bundled Glassfish, which host, where defined

Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4637
    
    5

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Netbeans bundled Glassfish, which host, where defined
 
Similar Threads
tomcat as a virtual host
Problem with the Contextpath in the url
Tomcat 404 error
Redirect behind proxy
Tomcat url redirect problem