wood burning stoves 2.0
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Http 404 Not found error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Http 404 Not found error" Watch "Http 404 Not found error" New topic

Http 404 Not found error

Rajitha Arun
Ranch Hand

Joined: Aug 24, 2006
Posts: 43

I installed tomcat and I am able to get to the "Index of /" page through http://localhost:8080/. I get Http 404 error, when I try to go to a html file which is created in a project directory under webapps/. I am not sure where I went wrong. Can somebody help please! Thanks.

Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

You must create a directory under webapps, which will be the name of your application. For example :
Then :

[My Blog]
All roads lead to JavaRanch
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277

for tomcat installation and testing the installation,
refer to the Marty Hall's web page -
i think its www.coreservlets.com

Hope this helps

SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
Rajitha Arun
Ranch Hand

Joined: Aug 24, 2006
Posts: 43

I was getting
LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:8080
. I found out that another application was listening to the same port as tomcat was. I fixed that error. Since I am new to tomcat I didn't know where exactly I made a mistake, so I looked into log file and figured out that I installed an application which was listening to the same port. Thank you so much for your replies.

I have another question. When the doPost() executes on the servlet, I don't get any parameter values. I have the html file from page 75 of HFSJ. Can anybody help me out with this?
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

Do this...

Enumeration e = request.getParameterNames();

Then iterate through the enumeration to find out if the parameter is reaching the servlet at all.

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Rajitha Arun
Ranch Hand

Joined: Aug 24, 2006
Posts: 43
Hi John,

I tried Enumeration. I get hasMoreElements() = true. but when I iterate I am not getting anything. What does it mean?
I agree. Here's the link: http://aspose.com/file-tools
subject: Http 404 Not found error
It's not a secret anymore!