0

Here is what is going on. Whenever I create a servlet on my laptop in NetBeans and deploy it locally, the servlet works perfectly. However, when I deploy the very same WAR file to my server (Apache Tomcat/6.0.36) over the network via the Manager app, I will always get this error. Whenever I attempt to access any .html or .jsp files included in the servlet, they work fine. However, whenever I attempt to access any of the servlets (the .class files), I always get this error. I am not using a web.xml, so I do not believe this can be the issue. I have hot deployed locally through NetBeans and also locally through the Manager app, and they both work. It only seems to be when I try to deploy this WAR through the Manager app to a different system.

Thanks for taking the time to read. Have a great day. :-)

Brian
  • 1,726
  • 2
  • 24
  • 62
  • 4
    "I am not using a web.xml": perhaps that's the problem. – paulsm4 Oct 14 '13 at 04:48
  • I was under the impression that a web.xml was not necessary when using servlets version 2.0 and later. – Brian Oct 14 '13 at 04:50
  • To access a Servlet you should map the Servlet class in Web.xml corresponding to the Url pattern. – Nishant Oct 14 '13 at 04:50
  • Again, I was under the impression the file wasn't needed for servlet versions 2.0 and greater. – Brian Oct 14 '13 at 04:52
  • What's the server/version that Netbeans uses locally? It might just be the difference between Tomcat 6 and 7. Also it might help to know what you use instead of web.xml, and if you're not having one at all, or if it's just more-or-less empty. – Olaf Kock Oct 14 '13 at 07:23

1 Answers1

1

You need Tomcat 7 with Servlet 3 support if you want to use annotations.

Kojotak
  • 2,020
  • 2
  • 16
  • 29