I never heard of ctakes, so my first impulse was to search the web to find out about it. Hopefully you did that too. In that case, you will have found documents which claim to answer your question. So, what specific questions do you have about those documents?
And also: from my brief research project I don't see anything about web applications being suitable (or not) for ctakes code. Is there a reason you posted this in the
Tomcat forum? I would have thought it would be better somewhere else, but if you have a specific Tomcat-related question about ctakes then don't hesitate to mention it, so the post can be put in the right place.