• 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

Getting error when loading servlet

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have downloaded tomcat 6 and am running through a book which tells me to create a new project "ch1" with the classes and web-inf folders. I am trying to visit the servlet using localhost/ch1/Serv1 but keep getting the following error



My web.xml


can anyone help me to get this working?

Thanks
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Place your servlet in a package other than the default.

As this is not Tomcat-specific, moved to the Servlets forum.
 
Paul Mackellar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't quite see what you mean.

My directory structure is tomcat>webapps> "ch1"which contains> classes and web-inf.

What should i do?
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're doing quite a few things wrong.

Firstly, it's WEB-INF, not web-inf. Case counts.

Secondly, the classes folder belongs in WEB-INF.

Thirdly, all classes in a web application must be in a package other than the default. If you are not familiar with Java packages, that's your first step.
 
reply
    Bookmark Topic Watch Topic
  • New Topic