So the categories will be dynamic and not static won't they? If so, you could use request params to handly, which category should be used
–
TraxdataFeb 9 '12 at 10:32

yes, category and sub category are dynamic. Can you show me a little example with request params ?
–
xuanhung2401Feb 9 '12 at 10:43

CONTEXT_ROOT/SOME_SERVLET/?maincategory=myMainCategory&subcategory=mysubcategory where maincategory and subcategory are the parameters and myMainCategory and mysubcategory are their values
–
TraxdataFeb 9 '12 at 10:47

The disadvantage is that my servlet container no longer serves static files, I have to write code to load them and serve them through the web app or serve them on apache and configure it to not reverse proxy to tomcat for any static files.

If your sub-category is static, then you may use the url mapping as /*/sub-category where * maps to CategoryServlet.java, from there you may get the request path which contains /dynamic-category/sub-category, you may extract your sub-category and dynamic-category. With this you can also use only one servlet.

Eclipse has nothing with your problem, you could as well use vi or emacs. Your problem can be solved by URL rewriting ( either on reverse proxy side, or by something like: http://www.tuckey.org/urlrewrite/ ) - just remap your good locking URLs to real servlets.

Or you could just use a filter, parse the servlet path and use information to render your templates.