aspose file tools*
The moose likes Servlets and the fly likes Beer-v1 in OS X, HeadFirst Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Beer-v1 in OS X, HeadFirst Servlets" Watch "Beer-v1 in OS X, HeadFirst Servlets" New topic
Author

Beer-v1 in OS X, HeadFirst Servlets

Ryan Supeene
Greenhorn

Joined: Oct 16, 2008
Posts: 2
HI there,

I was wondering if anyone had to do anything special to get this very basic first example working from HeadFirst Servlets and JSP.
For some reason once I have deployed everything as described in the book I get a 404 error.
Some details:

Trying to load site http://localhost:8080/Beer-v1/form.html
1. When web.xml is not in the WEB-INF the HTML loads ok
2. As soon as I add the web.xml and the webapps/Beer-v1/WEB-INF/classes/com/example/web/BeerSelect.class the from page no longer loads.

I have spend a good 4 hours trying to debug this and am just baffled I am sure its something stupid but I hope someone can lend me a hand. Thanks

Soupy
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Did you check your container's log ? Your web.xml might not be well-formed.


[My Blog]
All roads lead to JavaRanch
Ryan Supeene
Greenhorn

Joined: Oct 16, 2008
Posts: 2
Hi there
I solved the pepvblem by looking on the logs it was the XML
I was using URL-mapping not URL-pattern

That was not so smart
Thanks for your help

Soupy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Beer-v1 in OS X, HeadFirst Servlets