This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Servlet Annotation

 
Christopher Henry
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic