aspose file tools*
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
Author

Http 404 Not found error

Rajitha Arun
Ranch Hand

Joined: Aug 24, 2006
Posts: 43
Hi,

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.


Rajitha
SCJP, SCWCD
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

You must create a directory under webapps, which will be the name of your application. For example :
/webapps/firstapp/hello.html
Then :
http://localhost:8080/firstapp/hello.html


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

Joined: Oct 16, 2005
Posts: 1277
Hi,

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
Hi,

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
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

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?
 
Consider Paul's rocket mass heater.
 
subject: Http 404 Not found error