Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trouble with servlets

 
Brandon Potter
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having trouble configuring my web.xml file in the web app directory of tomcat.

When I add the servlet mapping and such as below ALL of my jsp pages then throw a 404 error.

NEW WEB.XML


OLD WEB.xml




And yes, my Servlet is called Servlet1 (trying to reorganize a project to better fit MVC)

EDIT*
Well, I was reading more and I realised something (newish to programming, at least in java) What is the best method for packaging your classes?
I tried doing something with it earlier today and in doing so, had some problems, so in just learning I cant leave it in a default package means I need to fix that.


 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I was reading more and I realised something (newish to programming, at least in java) What is the best method for packaging your classes?


You can see the convention at work in typical java library, where the first part of the package typically reflects an organization home URL.

For example the org.w3c.dom package, related to the World Wide Web Consortium at www.w3.org and the Apache Tomcat packages which start "org.apache"

The idea being that a URL is likely to be unique.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic