> -----Original Message----- > From: Mark Thomas [mailto:ma...@apache.org] > Sent: Friday, August 23, 2013 8:14 AM > To: Tomcat Users List > Subject: Re: is it possible to dynamically add servlets and websocket > endpoints > during startup based on our own configuration settings? > > On 22/08/2013 19:32, Bob DeRemer wrote: > > I'm in the process of developing a configurable server application > > which must handle various protocols, but the respective endpoints must > > be configurable. Specifically, I would like to programmatically add > > both HTTP servlet(s) as well as WebSocket Servlets/Endpoints during > > the contextInitialized call [based on our own configuration settings], > > as opposed to having all servlets in web.xml or annotated classes > > loaded automatically. > > > > Is this possible in Tomcat 7; and, if yes, are there any examples? I > > know the Endpoint aspect of the question depends on JSR-356 being > > back-ported. > > Yes, it is possible. > > There are some examples in the unit tests: > > http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/Test > StandardContext.java?view=annotate > > Look for calls to addServlet(...)
Great! So, how do I tell Tomcat NOT to load anything in the first place? Can I still use Annotation on my servlets, or will I have to use an interface-based approach? Also, how about for the JSR-356 Endpoints? Is there an addEndpoint(...) call? -thx again > > Mark > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org