If you run JBoss outside of Eclipse, just start it in the shell it should be accesible through your IP as well.
The reason why one would want to start JBoss in the IDE is to debug some code. Starting JBoss outside of the IDE won't stop my applications on any of my breakpoints. So, how can I access JBoss running in the IDE using the machine's IP Address?
Can you elaborate what you mean when you say you cannot "access" the server via IP?
Do you mean you cant create it? Or you can't start / stop it? Which step, exactly, fails?
I can access my web application when the url is:
But I get a 'Cannot find server' error when the url is:
I need the server to be operable with both urls.
My environment is:
IDE: JBossIDE for Eclipse Build id: 2.0.0.Beta2
AS: JBoss Version: 4.0.5GA(build: CVSTag=Branch_4_0 date=200610162340)
Again, where are you typing in "http://10.299.99.99:8080/mywebapp"? Are you typing in 10.299.99.99 when creating the server? Or are you typing this in on command line arguments? Or in an xml file? Which xml file?
I'm just very confused as to where you're typing in 10.299.99.99 and getting an error.
Do you get the same error if you run jboss OUTSIDE of eclipse? If you start jboss up from the command line only, does http://10.299.99.99:8080/mywebapp work?
If it doesn't work in eclipse AND it doesnt work outside of eclipse, than clearly you have a configuration error of some type, and not an eclipse error.
No. Both of these urls work when I start JBossAS from the command line.
I am executing these urls from IE and/or Firefox.
What command line arguments are you using? I'm assuming you're using windows bc you mention IE.
The only reason something like this could possibly be happening is if the server is loading a different configuration, or is receiving different command line arguments.
Are you modifying the command line arguments when starting the server from the shell? Are you modifying them when using the IDE? Are you sure when creating your server, you're making one out of the JBoss Inc. Category and not the JBoss category?
When I start up JBoss from the command line, I'm not using any additional arguments. I'm simply double-clicking on run.bat.
From the IDE, I've verified that I am using the JBoss Inc's version of the server (Red J semi-surrounded by mulit-colored dots).
Here are the default arguments that appear in the Launch Configuration window in the IDE:
Start Args: --configuration=default --host=localhost
Twiddle Args: -S -s localhost:1099
Stop Args: -s localhost:1099 -a jmx/rmi/RMIAdaptor
This isn't working because 10.299.99.99 isn't a valid ip address. The sections cannot be greater than 255.
To find the correct ip address, use (I think) ifconfig on linux or ipconfig on windows.
10.299.99.99 is a fictitious ip address for the purpose of discussion.
I've made some other observations:
If I set up a server by following the instructions from this link, http://docs.jboss.com/jbosside/jboss-as/demos/create_server.htm
and use the default value of localhost for the Server's host name then I experience the behavior that I've been describing. Furthermore, the entries that I've set up in my hosts file that point to my machine don't work either.
However, if I create a server and use my machine's name for the Server's host name, I'm able to access my web apps using my machines ip, my machine's name or any mapping that I've set up in the hosts file but now localhost doesn't work.
Again, this behavior only exists when I start up the server in the IDE.
There must be something going on behind the scenes that I'm not aware of thats doing this. I honestly can't imagine what it is.
The IDE is just a front end to starting the server, so there must be some flag or option that's not getting set when *I* launch the server than when it is launched via command line. And I honestly can't imagine what that is.
Ok... so here's what I've been told.
If you start JBoss with the --host=x, or -b x, where x is an ip, localhost, or machine name, it will ONLY bind to that one address. If you do not include those flags, it will bind to all available addresses. (This is clearly what you want)
The default behavior in the IDE is to bind to the host declared in the wizard used to create the server.
** TO CHANGE THIS ** for one server, you have to change it's command line arguments as follows:
In the server or JBoss Servers view, double click the server to open its editor.
Select the "Open Launch Configuration" hyperlink.
Go to the start arg tabs and remove the "--host=xyz" portion.
That should fix your issue.