Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access JBOSS Restful web service using IP and Port

I created a test JBOSS web service and there is only one test method in it. I access this using http://localhost:8070/MyWebService/MyRESTApplication and it shows the result from the web service. I tried this in both Eclipse and Browser and it works.

But when i want to access this web service using IP address of my system then it shows ERROR message that Page cannot be displayed (in fact browser is not able to find this web service).

I want to access like this http://IPaddress:8070/MyWebService/MyRESTApplication what should i do so that i can access it using my IP from some computer

like image 486
waseemwk Avatar asked Mar 31 '12 08:03

waseemwk


2 Answers

You have to start JBoss using :

./run.sh -b [your_IPaddress]
like image 179
alain.janinm Avatar answered Sep 23 '22 21:09

alain.janinm


On windows:

start run.bat -b 0.0.0.0

This will tell it to start and bind to all network interfaces. You can also replace 0.0.0.0 with your actual IP if you only want it to bind to that network interface.

I find it easier for debugging to have it come up on all network interfaces because this will work when you are running a virtual machine to debug something like Internet Explorer.

like image 42
Jay Prall Avatar answered Sep 20 '22 21:09

Jay Prall