sitebricks

Sitebricks and Channel Presence Service (GAE); Also having trouble with normal servlets

南楼画角 提交于 2019-12-25 05:25:15
问题 In my Java Google App Engine server application, I would like to enable Channel Presence servlets in order to track connections/disconnections to/from my channels using the Channel API (as described here. I have already edited my WEB-INF/appengine-web.xml file like described. Most servlets in my application use Sitebricks , instead of classes extending HttpServlet, to provide an easy way for me to create REST endpoints in my app. BUT, it seems like using Sitebricks in my class, like so, does

How is annotations support in jsp implemented in sitebricks?

那年仲夏 提交于 2019-12-25 03:47:16
问题 Here is an example from the SiteBricks user guide: <html> <body> @ShowIf(true) <----- I'm impressed with this line <p>${message} from Sitebricks!</p> </body> </html> I'm curious how is it implemented? (I mean how and at which entry point sitebricks creators managed to enhance transforming jsp to servlet?) Thanks for any ideas! 回答1: There is no filter doing this. We have our own templating logic that uses what is known as a recursive descent parser. It's actually a non-trivial problem to

Inject @SessionScoped value into filter with Guice

ぃ、小莉子 提交于 2019-12-13 03:43:11
问题 I have a class hold value of a user in session @SessionScoped class UserSession{} Now I have a LoginFilter to ensure some url accessed with user login class LoginFilter{ @Inject UserSession userSession; ... } Then Out of scope exception was thrown when I try to bootstrap jetty. How can I check if the session contains the UserSession object? I don't know the attribute name of UserSession class. 回答1: You can inject a Provider<UserSession> instead of a plain UserSession . 来源: https:/

Is Sitebricks compatible with GAE backends (Java)

我们两清 提交于 2019-12-11 12:47:52
问题 I would like to know whether it is possible to host a Google App Engine backend servlet using Sitebricks. I am trying to do so in my GAE Java app -- frontend gets the backend URL using GAE's BackendService interface and send an HTTP Request -- but the HTTP response always returns with a 404 Not Found ). I would love to post some source code / configuration files, but I fell that it may be best for me to explain what I am doing. Basically, my servlet has been configured using Sitebricks in the