wood burning stoves 2.0*
The moose likes Servlets and the fly likes Problem with Servlet Annotation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem with Servlet Annotation" Watch "Problem with Servlet Annotation" New topic
Author

Problem with Servlet Annotation

Christopher Henry
Greenhorn

Joined: Sep 22, 2011
Posts: 2
I am having a problem with Servlet Annotations

Server Setup:
Ubuntu 12.04
Apache Tomcat 7.0.5
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09)

I have 15 users that can deploy web applications to the server. However, I do not give them access to /usr/local/apache-tomcat-7.0.5/webapps/ Instead, I have created folders userXX inside the webaps directory. Users only have write access to one folder. Thus, they cannot alter the contents of the other directories. In order to deploy their web application, they copy their war file to their userXX directory, extract the files, and remove the war file.

Problem:
Using web.xml, everything is fine. However, I cannot get a web application to work using @WebServlet from within these directories (i.e. I receive a 404). There is no problem if I copy the same war file to /usr/local/apache-tomcat-7.0.5/webapps/ (as the administrator) and let the server create a directory and extract the contents.

Is there a way to use Servlet Annotations with my setup? Do I need to update Tomcat and the VM?

Many thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem with Servlet Annotation
 
Similar Threads
The requested resource (/servcart/Welcome) is not available.
Changing Locale link behave one step behind
Error while installing Tomcat 5
Error The requested resource is not available
Converting Tomcat app from Windows to Ubuntu