JSP or .ascx equivalent for Scala?

Posted by Daniel Worthington on Stack Overflow See other posts from Stack Overflow or by Daniel Worthington
Published on 2009-10-30T05:44:23Z Indexed on 2010/03/31 18:33 UTC
Read the original article Hit count: 474

Filed under:
|
|

I'm working on a small MVC "framework" (it's really very small) in Scala. I'd like to be able to write my view files as Scala code so I can get lots of help from the compiler. Pre-compiling is great, but what I really want is a way to have the servlet container automatically compile certain files (my view files) on request so I don't have to shut down Jetty and compile all my source files at once, then start it up again just to see small changes to my HTML.

I do this a lot with .ascx files in .NET (the file will contain just one scriptlet tag with a bunch of C# code inside which writes out markup using an XmlWriter) and I love this workflow. You just make changes and then refresh your browser, but it's still getting compiled!

I don't have a lot of experience with Java, but it seems possible to do this with JSP as well. I'm wondering if this sort of thing is possible in Scala.

I have looked into building this myself (see more info here: http://www.nabble.com/Compiler-API-td12050645.html) but I would rather use something else if it's out there.

© Stack Overflow or respective owner

Related posts about scala

Related posts about ascx