tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob DeRemer <bob.dere...@thingworx.com>
Subject RE: is it possible to dynamically add servlets and websocket endpoints during startup based on our own configuration settings?
Date Tue, 03 Sep 2013 21:14:41 GMT


> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: Tuesday, September 03, 2013 4:46 PM
> 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 03/09/2013 21:35, Bob DeRemer wrote:
> 
> > Just getting around to trying this - maybe a stupid question, but how do I get
> access to the WsServerContainer instance?
> 
> From the ServletContext. You want the attribute called
> "javax.websocket.server.ServerContainer"

Thanks, I got the ServerContainer and can now call addEndpoint, but it expects the class I
pass in to have the @ServerEndpoint annotation.   I removed the annotation because Tomcat
was ALWAYS adding any pojo with that annotation, and my goal is to only add ServerEndpoints
that I read in from my own configuration.  Is there a way to do this?

> 
> Mark
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message