aspose file tools*
The moose likes Servlets and the fly likes Trouble with servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Trouble with servlets" Watch "Trouble with servlets" New topic
Author

Trouble with servlets

Brandon Potter
Greenhorn

Joined: Jul 22, 2011
Posts: 14
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

Joined: Mar 22, 2000
Posts: 12781
    
    5
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
 
subject: Trouble with servlets