Questions tagged [sitebricks]

A fast, light platform for web development.

Sitebricks is a simple set of libraries for web applications. Sitebricks focuses on early error detection, low-footprint code, and fast development. Powered by Guice, it also balances idiomatic Java with an emphasis on concise code.

37 questions
1
vote
2 answers

Sending a consistent JSON response to report exceptions with Sitebricks

I am developing a webapp that provides a number of REST endpoints with Google Sitebricks. To minimize duplicate/similar code I would like to configure sitebricks to respond with a consistent Reply object every time the code executed in the REST…
Ingo
  • 1,552
  • 10
  • 31
0
votes
2 answers

How to generate an HTML table in Sitebricks?

Using Sitebricks, I want to generate a table where one object backs each in a table. The only examples I've seen have one object back an entire - so the HTML is consistent across each row. I would like to be able to wrap N entries in…
oconnor0
  • 3,154
  • 6
  • 34
  • 52
0
votes
1 answer

Display hyperlink in based on condition in google sitebricks

I am using Google Sitebricks for developing a user interface. I have a table which i am displaying using @repeat annotation @Repeat(items=regusers, var="reguser")
0
votes
2 answers

embed header and footer in all html page using google sitebricks @embed

I am building an Admin dashboard with google guice and sitebricks .Can you please tell me how to include other html files in a html page ? I am looking for a function similar to php's include("header.html") function . I see that sitebricks has an…
0
votes
3 answers

How is annotations support in jsp implemented in sitebricks?

Here is an example from the SiteBricks user guide: @ShowIf(true) <----- I'm impressed with this line

${message} from Sitebricks!

I'm curious how is it implemented? (I mean how and at which entry…
Roman
  • 64,384
  • 92
  • 238
  • 332
0
votes
1 answer

Howto make a dynamic web module with sitebricks and annotations?

I'm trying to create a dynamic web module with sitebricks, without web.xml. (Annotations only.) I have been searching the net for good examples, but all of them are simple java applications containing an embedded jetty web server. I have already…
nagylzs
  • 3,954
  • 6
  • 39
  • 70
0
votes
1 answer

Upgrading open source libraries in Web application

I am working on a J2EE web-application. I would like to upgrade some of major open-source libraries from older version to newer one based on availability of libraries on maven repository. For example of libraries : Google-Sitebricks, Jetty, JSON,…
0
votes
1 answer

Sitebricks file download service throws AccessControlException - access denied

I need to make a file available for download from a certain URL on my server(It's a google app angine project). Here is what I use: @At("/api/download") @Service public class ZipDownloadService { @Get public Reply downloadZip() throws…
0
votes
1 answer

Inject @SessionScoped value into filter with Guice

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…
jilen
  • 5,633
  • 3
  • 35
  • 84
0
votes
1 answer

ClassCastException while returning redirect url from post method

@At("/notes") @Service public class NotebookService { private Note note =new Note(); public NotebookService(){ ObjectifyService.register(Note.class); } public Note getNote() { return note; } public void…
Neil
  • 5,919
  • 15
  • 58
  • 85
0
votes
1 answer

Sitebricks service interception?

I am working with Sitebricks I like it. I wonder,however, what the best approach for services intercepting for cross-cutting tasks, is ? Logging, Validation, Exception Handling, are all tasks to be put in an interceptors like components. Currently I…
Adelin
  • 18,144
  • 26
  • 115
  • 175
0
votes
1 answer

How to send payload data using sitebricks web client using http delete method

I am using sitebricks http client to send http requests to a rest service. My question is how to send a payload data with delete ? post method accepts data as a parameter WebClient client =…
Adelin
  • 18,144
  • 26
  • 115
  • 175
0
votes
2 answers

Build sitebricks with maven

I'm stuck generating jars for Sitebricks with maven. I downloaded the repository from git with the following command: git clone https://github.com/dhanji/sitebricks.git sitebricks When using "mvn package" everything works fine. As I need the…
Averius
  • 165
  • 1
  • 2
  • 13
0
votes
2 answers

Why sitebricks response with 405 status when using delete method?

I am implementing a simple rest service with the 4 http methods get,post, put and delete using sitebricks. trying to send a delete request to the defined service with a WebClient I get a 405 response. Does anyone knows why would I get such response…
Adelin
  • 18,144
  • 26
  • 115
  • 175
0
votes
2 answers

Sitebricks JSON default serializer. And why does it return text/json instead of application/json

Hmm...I intended on asking only one question. But I've instead decided to kill two birds with one stone. First Question: What does Sitebricks use as the default serializer/deserializer between Java POJOs and JSON? For example, let's say that this is…
ecbrodie
  • 11,246
  • 21
  • 71
  • 120