I wrote a javaservlet and the webpage which accesses them using Eclipse and tomcat 7 compiled in java 1.6. I love how the latest servlet spec allows you to use annotation and buypass the need for web.xml. My servlet contains the following line to tell tomcat about itself:
But now comes the painful part: deployment. I have a Mac 10.5 Server with tomcat 6 running on it. When I first made the war file, I dumped it into the webapp directory and it unpacked (autodeploy is set to true) and yet when I went to access the url, it gave me first some 404 errors and then later on some 503 errors. After deleteing and redploying things several times now to try and get it right, it no longer autodeploys when I put the war file in.
So how do I get Tomcat to see this servlet and host it on this mac server?
Yes, I'm aware of that. I mentioned that merely so that you would know I did not have it set up originally with a web.xml file.
I did write one after the fact, but it's been a while since I've done anything with tomcat so I may have gotten it wrong:
The classes are located in my WEB-INF/classes directory. When I deployed I got the following errors:
WARNING: Error while removing context [/MyApp]
java.lang.NullPointerException ContainerBase.java:915 (removeChild)
WARNING: Error during context [/MyApp] destroy
java.lang.NullPointerException HostConfig.java:1180 (checkResources)
java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class serv.Authenticate)