wood burning stoves 2.0*
The moose likes Servlets and the fly likes Deployment of web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Deployment of web application" Watch "Deployment of web application" New topic
Author

Deployment of web application

kannan vinayagam Duraiswamy
Ranch Hand

Joined: Jan 12, 2009
Posts: 52
Hi,
I created a small web application using jsp and servlet.
I deployed the web application in tomcat5.5.
The web application is launched successfully.
i use windows xp.I use the following url to access my web application,
http://localhost:8080/webapplication1

i need to access this web application in another client machine.
how to do that?

i tried like this,
http://myclientip:8080/webapplication1
but its not working?
can any one guide me ...


Kannan.DV
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1474
    
    6

what is myclientip? Is it the ip of the system on which the application is deployed? If yes make sure that network connectivity in both the machines are ok and any firewall is not restricting the request to hit that system on port 8080.


Swastik
kannan vinayagam Duraiswamy
Ranch Hand

Joined: Jan 12, 2009
Posts: 52
myclientip- my system ip -the web application is deployed here.
how to check the firewall is restricting the request at the port 8080?.
i am new too n/w, please guide me..
thanks for your response..
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1474
    
    6

My networkplaces->properties->Local Area Connection->Properties

Now goto advanced tab, click windows firewall settings, if on is selected , select off , apply the settings and see it works
kannan vinayagam Duraiswamy
Ranch Hand

Joined: Jan 12, 2009
Posts: 52
i checked in both client machine, the firewall is turned off.but still its not working in another client machine.
i tried like this in myclient machine,
http://myclientip:8080/webapplication1
but its not works!.
then i checked the host file in the winows's etc path,
in that the host file has the following content,
127.0.0.1 localhost

is there any thing need to configure in this file?.
thanks you...
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1474
    
    6

try telnet from command prompt and see what you get

telnet <yoursystemip> space 8080
kannan vinayagam Duraiswamy
Ranch Hand

Joined: Jan 12, 2009
Posts: 52
result :
C:\>telnet 172.18.11.13 8080
Connecting To 172.18.11.13...Could not open connection to the host, on port 8080: Connect failed


Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1474
    
    6

Someway or the other port 8080 is getting blocked for remote access, honestly very tough from here to resolve. My suggested solution would be try to change the port number of tomcat itself and try to hit the requests on the particular port and see if works.
kannan vinayagam Duraiswamy
Ranch Hand

Joined: Jan 12, 2009
Posts: 52
thanks for your suggestion.
i will try and I let you know the result.
thanks for sharing the time with me...

Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

"kannan dv " please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.


SCJP, SCWCD.
|Asking Good Questions|
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Hi Kannan,

First understand the URL and your request .



We can segregate this string into 4 parts.

1. http -- the protocol used for exchanging information over web. HTTP stands for Hyper Text Transfer Protocol. Nothing much to discuss/deal with it as it is available with every browser application with which you access your web applications.

2. localhost -- the hostname of the machine in which your application is (should be) running. You can specify the IP address as well (if you are pretty sure). It would then be http://127.0.0.1:8080/mywebapplication. The ip address 127.0.0.1 is called 'local loop back address' which always points to the local host (same machine).

A typical example would be http://172.168.10.4:8080/mywebapplication where 172.16.10.4 is the IP address of your machine -- which is an unique number assigned to every machine in a network. If you are not very sure of it, contact your network administrar for the same.

3. 8080 -- An unique number which is used to identify an end point in a machine where a specific application is expected to listen to any requests from the clients. The combination of the {hostname, port number} is usually termed as a socket which is an unique end point in a machine. You have to have an unique port number to individually host your application so as NOT to have a a conflict in any other applications/listening sockets in the same machine.

If you take a typical example in every machine, we have FTP accessible on port #21, SMTP (email) is accessible on port #25 etc., -- same logic applies here.

4. mywebapplication -- A unique string (set of characters) usually termed as a context root which uniquely identifies an application deployed into a container or server which can then serve any subsequent requests for the application.

Having said all these, you said you are able to access your web application with the URL, http://localhost:8080/webapplication1 -- that means,

1. you have deployed an application with the context root 'webapplication1'
2. in the machine whose hostname is 'localhost'
3. on the port number '8080'.

Now, when you want to access the same application in a different machine means, you should have to MANUALLY install/deploy the application in the machine. In other words, the other machine (myclientip) does NOT know how to respond to your requests for the context root 'webapplication1'. For which, first you should deploy the application in the machine which is identified by the hostname 'myclientip'.

Next, as you make the request on the port #8080, there has to be something/someone waiting and listening to the requests on that port number. Generally for these web applications, we have to have a web server or web container which does this work. In your case, as you mentioned, you have to install the Tomcat (web container) in the 'myclientip' machine and you should set the port # to 8080 so that it can receive any requests on the same port number.

Hope this explains and clarifies

Good luck.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

As it seems to be Servlet/JSP related, can it be in that forum? Just a thought.
John Jackson
Greenhorn

Joined: Jul 09, 2008
Posts: 6
Firewall issue perhaps?

You need to have your firewall allow incoming connections to port 8080 (or whatever port the container is serving the page from) for that machine.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Deployment of web application