• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Http 404 Not found error

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rajitha Arun
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do this...

Enumeration e = request.getParameterNames();

Then iterate through the enumeration to find out if the parameter is reaching the servlet at all.
 
Rajitha Arun
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi John,

I tried Enumeration. I get hasMoreElements() = true. but when I iterate I am not getting anything. What does it mean?
 
Bras cause cancer. And tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic