It's not a secret anymore!
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Can't start tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Can Watch "Can New topic

Can't start tomcat

Qualtar Demix

Joined: Mar 14, 2012
Posts: 15
When i start tomcat it gives the following log:

My directory structure is:

I know this question has been asked before, but that solution does not work in my case.
I added users in tomcat-users.xml, but to no avail. The issue persists.
My tomcat-users.xml looks like :

i am using apache-tomcat 7.0.26

**On a side note :
What effect would running apache have on this?
I have started and then stopped apache from taskbar. Still, no effect.

Qualtar Demix
....and I sensed an infinite scream passing through nature
Vinod Tiwari
Ranch Hand

Joined: Feb 06, 2008
Posts: 466

There is some issue with your web.xml file.

Vinod Tiwari | Twitter | Shikshanirman | Guftgu
Qualtar Demix

Joined: Mar 14, 2012
Posts: 15
Thanks Vinod,
I did the proper mapping in my web.xml and now the tomcat server is starting without any exception. But i don't understand. I haven't created corresponding class. Why do i need to write web.xml. All i want is to run my form.html on a browser. Shouldn't i use a simply blank web.xml.

Also my form.html is not opening. Browser says "Unable to connect".
I tried netstat -aon on my command prompt to see which pid is using port 8080 but the result shows that no service is using 8080.
URL i typed: http://localhost:8080/Coke-v1/form.html

Qualtar Demix

Joined: Mar 14, 2012
Posts: 15
Problem resolved finally....
Instead of using port 8080 i used the port given in tomcat logs (8085 in my case)....
And no mapping is needed in web.xml. We can simply write the web.xml with headers and no mapping. It will not load any class but the first form page loads just fine.
I agree. Here's the link:
subject: Can't start tomcat
It's not a secret anymore!