Is Sitebricks compatible with GAE backends (Java)
Asked Answered
T

1

1

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 same exact manner as my frontend servlets that are working perfectly (ie, using the @Service, @At and @Get annotation in the servlet classes and methods, plus configuring SitebricksModule in my app's global Guice Injector instance). I am using a dynamic backend instance, configured properly in backends.xml.

Does anyone have any hints on pairing Sitebricks with GAE Backends?

Tumid answered 20/12, 2012 at 1:42 Comment(0)
H
0

Yes Sitebricks works on GAE. I recommend the 0.8.8-SNAPSHOT version from sonatype's OSS repo for latest functionality. Otherwise the latest tested release is 0.8.7 from Maven Central. The only bit that doesn't work is requesting other websites from GAE using the Sitebricks Web Client.

Are you using GuiceServletContextListener? This is the best way to create an Injector. Also make sure your web.xml points to it and sets up GuiceFilter correctly (as per sitebricks.org docs).

Dhanji. (maintainer, sitebricks)

Howitzer answered 20/12, 2012 at 17:25 Comment(2)
Thanks for your reply, @Dhanji R. Prasanna. However, I am already doing everything you mentioned in this post, such as using GuiceServletContextListener and using the web.xml filter. Doing these steps above with Sitebricks allows me to map servlets to REST endpoints on frontend instances, but not backend instances. Are you sure your steps will work on backends?Tumid
BTW, I highly recommend that you post the official Maven version of Sitebricks somewhere more useful such as sitebricks.org or the project's Github or Google Code pages.Tumid

© 2022 - 2024 — McMap. All rights reserved.