Jersey and scalate in Gae

33 views
Skip to first unread message

hell0

unread,
Jul 30, 2012, 1:24:29 PM7/30/12
to sca...@googlegroups.com
I am trying to create a simple scala project for gae platform, After reading several threads i reached the step where i am able to load precompiled jade template in my jersey rest resource
 which has following get method and i mapped to /jadeview

   @GET
   @Produces(Array(MediaType.TEXT_HTML))
    def get = 
    {
        val template = engine.load("example.jade")
        val processed = engine.layout("/", template, Map("user" -> User("Bart")))
        println(processed)
        Response.ok().entity(processed).build()
    }

    // and ...
    val engine = new TemplateEngine

So everything works just fine till println, the template prints just fine with passed in values, but somehow on the browser i get the following stack trace!


I have no clue from here on, any suggestions would be great.

hell0

unread,
Aug 7, 2012, 4:23:56 PM8/7/12
to sca...@googlegroups.com
Ok i am sorry guys but i dont understand this framework, The weird thing is it screwed up all my rest resources with the same error. Also in the docs i found that we should use guice and on switching to guice, scalate seems to be taking a wild stroll to find some unkown .ssp files.  http://pastie.org/4407768 

Thanks. 

James Strachan

unread,
Aug 8, 2012, 3:25:39 AM8/8/12
to sca...@googlegroups.com
Use the ServletTempalteEngine rather than a vanilla TemplateEngine if
working with servlets/JAXRS
--
James
-------
FuseSource
Email: ja...@fusesource.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

FuseSource: integration everywhere
Reply all
Reply to author
Forward
0 new messages