Questions tagged [scalatra]

Scalatra is a tiny Scala web framework, inspired by Sinatra.

Scalatra is a microframework written in Scala. It is a port of the Sinatra framework written in Ruby. Scalatra can be expanded into a minimal but full-featured model-view-controller web framework.

Website: http://scalatra.org/

Source: https://github.com/scalatra/scalatra

309 questions
5
votes
1 answer

How to debug scalatra application in IntelliJ Idea?

I can't find any documentation or examples of debugging Scalatra apps in IntelliJ Idea. Is it possible to run the Scalatra app in debug mode to attach the Idea?
Valentin V
  • 24,971
  • 33
  • 103
  • 152
5
votes
4 answers

How can one change the location of the "webapp" directory for a Scalatra application?

By default, Scalatra expects the "webapp" directory to be at src/main/webapp. How could that be changed to, e.g., content/doc-root? sbt allows for customizing its default directories using something like the following: scalaSource <<=…
Chris W.
  • 1,680
  • 16
  • 35
5
votes
1 answer

Akka, Scalatra and Web state questions

This is a two part question, firstly more of a design question than how to implement it, and secondly some implementation concerns with Akka. I'm using Scalatra to build a REST service end point that when called will pull images from several…
Owen
  • 6,992
  • 7
  • 44
  • 77
5
votes
3 answers

Jetty HTTP 413 Header Full error - Java/Scala

I am using Jetty 7.6 with Scalatra web framework. In some of the requests, I need to send a large text as response body to the client, I use HttpServletResponse.getWriter() to write response. I noticed that on client side I receive 413 Header Full…
Ali Salehi
  • 6,899
  • 11
  • 49
  • 75
5
votes
2 answers

Scalatra Session without cookies

I'm using the Scalatra framework to build a web application. The application relies on sessions, but I can't use session cookies (because technically there is only one user, which runs multiple sessions simultaneously). Each session has a unique…
Waboodoo
  • 508
  • 4
  • 17
4
votes
1 answer

Scalatra 2.1 Akka Futures Example

Does anybody know of a place where I could find an example of the classical "chat" application, using Akka Futures with Scalatra 2.1? The Futures example in the documentation is a bit trivial, and since I am completely new to Akka, and relatively…
Eduardo
  • 8,362
  • 6
  • 38
  • 72
4
votes
1 answer

Scalate ResourceNotFoundException in Scalatra

I'm trying the following based on scalatra-sbt.g8: class FooWeb extends ScalatraServlet with ScalateSupport { beforeAll { contentType = "text/html" } get("/") { templateEngine.layout("/WEB-INF/scalate/templates/hello-scalate.jade") …
Yang
  • 16,037
  • 15
  • 100
  • 142
4
votes
1 answer

Using Akka with Scalatra

My target is building a highly concurrent backend for my widgets. I'm currently exposing the backend as a web service, which receives requests to run a specific widget (using Scalatra), fetches widget's code from DB and runs it in an actor (using…
parsa
  • 2,628
  • 3
  • 34
  • 44
4
votes
1 answer

How do I make the default response Content-type: application/json with Scalatra

I'm learning Scalatra and am wondering how I can make the default Content-Type of my responses application/json. The current default appears to be text/html. Neat, but not really useful to my application. The current default is text/html. $ curl…
Bob Kuhar
  • 10,838
  • 11
  • 62
  • 115
4
votes
2 answers

Scalatra test failing using ScalatraSuite (FunSuiteLike) for standlone sbt project

I am attempting to run a test for a Scalatra route using ScalatraSuite (FunSuiteLike). I receive an IllegalArgumentException with the following error when running the test: The detected local port is < 1, that's not allowed I also tried running…
rg41
  • 131
  • 2
  • 6
4
votes
1 answer

Out Of Memory Error with larger file uploads

I've had some issues with larger file uploads to my jetty server Trace. I'm uploading as Multipart/form-data, and fetching the file from the request using scalatra's FileUploadSupport (as below) class foo extends ScalatraServlet with…
Richard
  • 43
  • 4
4
votes
4 answers

geting "No lifecycle class found!" in scalatra

I am trying to run scalatra with sbt using container:start command but i get "assertion failed: No lifecycle class found!" message , this is the full stack trace i got with "last container:start" : Blockquote last container:restart …
user1120007
  • 268
  • 3
  • 13
4
votes
1 answer

How to make scalatra compile task depend on scala.js packageJS task in sbt?

I have a scalatra project within which I want to serve JavaScript that's been generated from a scala.js project. I have a multi-project sbt build that allows me to build both these project successfully. That is, I can use the compile (and run) tasks…
Chris
  • 1,685
  • 10
  • 15
4
votes
4 answers

My http request becomes null inside an Akka future

My server application uses Scalatra, with json4s, and Akka. Most of the requests it receives are POSTs, and they return immediately to the client with a fixed response. The actual responses are sent asynchronously to a server socket at the client.…
Eduardo
  • 8,362
  • 6
  • 38
  • 72
4
votes
3 answers

Scalatra API Token authentication module

I am building a RESTful API on top of Scalatra. Being new to the framework, I'm not entirely sure if there's already a solution out there that'll help me authentication users against the API using some token based system (not OAuth). Doesn't have to…
randombits
  • 47,058
  • 76
  • 251
  • 433
1 2
3
20 21