aspose file tools*
The moose likes Tomcat and the fly likes Tomcat 5.5 - application development Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 5.5 - application development" Watch "Tomcat 5.5 - application development" New topic
Author

Tomcat 5.5 - application development

sasikumar palakkizhi
Greenhorn

Joined: Sep 11, 2005
Posts: 29
Hi
I installed Tomcat 5.5 in C:\Tomcat 5.5 folder on windows xp platform and tried to run a simple html file ( This is from the book �Head First Servlets and JSP page 75-77) using a browser connecting to an address �http://localhost/webapps/Beer-v1/form.html�. I got the error message �HTTP Status 404� .Could you help me to correct the same.

1) Tomcat service is started after copying the form.html and web.xml files ( I could access http://localhost/servlets-examples/servlet/HelloWorldExample )

2) form.html (given below) is copied in C:\Tomcat5.5\webapps\Beer-v1\ and web.xml is copied in to C:\Tomcat 5.5\webapps\Beer-v1\WEB-INF ( Beer-v1 and Beer-v1\WEB-INF are created by me)

Web.xml is given below

Form.html is given below


Thanks
Sasikumar
fred Joly
Ranch Hand

Joined: Jan 19, 2006
Posts: 55
what about the port number ?
Read carefully the url you wrote :


you miss the port number.
sasikumar palakkizhi
Greenhorn

Joined: Sep 11, 2005
Posts: 29
Originally posted by fred Joly:
what about the port number ?
Read carefully the url you wrote :


you miss the port number.
sasikumar palakkizhi
Greenhorn

Joined: Sep 11, 2005
Posts: 29
Hi
The port number used is default one ,ie 80. Though that is added in the link(like http://localhost:80/webapps/Beer-v1/form.html),the browser changes the link in to http://localhost/webapps/Beer-v1/form.html. while installation, i had set the port number for all http transactions as 80.

Is it necessary to configure anything else?
Whether the flder to which i copied the files are correct?
What would be the other problems?

regards
sasikumar
fred Joly
Ranch Hand

Joined: Jan 19, 2006
Posts: 55
http://localhost/webapps/Beer-v1/form.html.


You don't need to mention "webapps" in the URL.
Tomcat "knows" that he has to look in the webapps folder.

the default port number for tomcat is not 80 but 8080.(maybe you have change that someway)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
Port 80 is the default port for HTTP, so the browser or server may well leave it out (same for port 443 for HTTPS).


Ping & DNS - my free Android networking tools app
sasikumar palakkizhi
Greenhorn

Joined: Sep 11, 2005
Posts: 29
Hi,

I tried the link http://localhost/Beer-v1/form.html also.. Again it shows HTTP status 404. I have been trying to correct the problem for more than a week.

Since it shows staus of 404, it means tomcat hasn't found the application .. Isn't it?

Can I get any suggestion?

regards
sasikumar
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
Since it shows staus of 404, it means tomcat hasn't found the application .. Isn't it?

Either tomcat can't find the application or it cant find the named html file with the URL supplied. I am guessing there is something wrong with the directory structure or the web.xml and Beer-v1 is not being recognized as a web application.

Bill
sasikumar palakkizhi
Greenhorn

Joined: Sep 11, 2005
Posts: 29
Hi

Thanks for the replies and support..

I got the program working..

I re installed Tomcat. This time, i selected the full installation.

I didn't understand the exact reason for this behaviour.. But the programs are working now... and I can start and stop Tomcat using " Apache tomcat properties" dialog box

Once again thanks to all who replied

regards
sasi
Krzychu Montana
Greenhorn

Joined: Oct 17, 2009
Posts: 4
[duplicate post removed]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Tomcat 5.5 - application development