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
1
vote
1 answer

NetworkError: 403 Forbidden accessing websocket in tomcat

I have configured a webapp to run in tomcat7. I connect to it via websocket using scalatra atmoshphere. Everything works fine when both my client and server are on the same machine. But once I tried running the server at a remote location I was not…
user79074
  • 4,937
  • 5
  • 29
  • 57
1
vote
1 answer

Scalatra response HMAC calulation

I'm developing a web service using Scalatra and I want to use HMAC for bidirectional authentication. So far, I've implemented the client authentication to the server: the client (an Android app) calculates a HMAC/SHA512 for each request using these…
lucian.pantelimon
  • 3,673
  • 4
  • 29
  • 46
1
vote
2 answers

merge strategy not working for deduplicate issue with sbt-assembly

I am getting deduplicate errors when trying to run assembly. I have used a number of different approaches for my merge strategy to try to fix the problem but none of them seem to work.. sbt output for the error [warn] Merging 'META-INF\DUMMY.DSA'…
Matt Foxx Duncan
  • 2,074
  • 3
  • 23
  • 38
1
vote
1 answer

Scalatra authentication

I'm reading scalatra authentication tutorial. Wrote my own auth strategy based on DB, AuthenticationSupport trait, added basicAuth() to controller and now authorisation works. But I still can't understand, how can I put and get user id from session…
Patison
  • 2,591
  • 1
  • 20
  • 33
1
vote
2 answers

Any examples of code integrating Scalatra with Spark

I'm new to Scalatra. I've been experimenting with Spark. I want to integrate Spark with a Scalatra web interface. I have found two examples so far of code integrating Scalatra with Spark. One is from Github (link below) and does not seem to follow…
user3145355
  • 11
  • 1
  • 3
1
vote
1 answer

Scalatra Logging Error

I get the following error/warning when starting my Scalatra web app: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See…
Johan S
  • 3,531
  • 6
  • 35
  • 63
1
vote
0 answers

Scalatra link image file outside application

I can't seem to figure out how to display a file in a view that is located outside of the .war file. In the application I am working on I have a folder of images that is volatile at '/path/to/images/'. I am trying to link the file 'myfile.jpg'…
awfulHack
  • 857
  • 1
  • 10
  • 25
1
vote
2 answers

Conscript won't install - what to do?

I'd like to started with Scalatra. For that, I need to use giter8 to generate a template project. To install giter8, I need to install conscript first. But doing that (at least using the runnable jar on Windows) fails with this…
herman
  • 11,740
  • 5
  • 47
  • 58
1
vote
1 answer

Hello World ScalaTest Failing: not found: type MyScalatraServlet

I'm trying to get Hello World to get a green test in my hello world scalatra application. The code for the servlet is: package com.graphular.app import org.scalatra._ import scalate.ScalateSupport class MyScalatraServlet extends GraphularStack { …
BenMorganIO
  • 2,036
  • 17
  • 37
1
vote
1 answer

For iteration on scalatra input

I am trying to read input in scalatra webapp using for iteration in below manner for ( input1<- params.getOrElse("input1", ""); input2 <- params.getOrElse("input2", ""); search <- params.getOrElse("search", false) ) { …
Rajeev
  • 4,762
  • 8
  • 41
  • 63
1
vote
1 answer

Abstracting CRUD operations using Squeryl and a Base Class

I've joined the proud ranks of people trying to use Squeryl as my ORM framework for a web app. (For the record, I'm using Scalatra as the actual web framework -- but I don't think this is a Scalatra question.) This means I've joined the ranks of…
Gastove
  • 896
  • 2
  • 10
  • 21
1
vote
2 answers

Scalatra with c3p0 without any extra libs

Im a newbie scala and scalatra developer. Im trying to integrate c3p0 to get connection pooling in my application. All the examples on the scalatra page is with squeryl etc, but I dont want orm and dsl. Do anyone have a ok examples with scalatra and…
1
vote
1 answer

Create an executable jar for SBT scalatra webapp using Jetty

I wrote a small scalatra webapp using SBT. Webapp has default jetty plugin configured. Now i want to create an executable jar from that scalatra webapp which should run by simply executing the jar. I am trying to bundle the jar with assembly plugin…
Rajeev
  • 4,762
  • 8
  • 41
  • 63
1
vote
0 answers

Scalatra location for javascript

I generated a Scalatra project using the standard instructions (using giter8). I've created a AngularJS frontend with an index.html that I've placed at WEB-INF/views/index.html. It can see the html, but I can't get Scalatra to see the…
1
vote
1 answer

How to test remote (production) Scalatra web service with Specs2?

I'm using Specs2 to test my Scalatra web service. class APISpec extends ScalatraSpec { def is = "Simple test" ^ "invalid key should return status 401" ! root401^ addServlet(new APIServlet(),"/*") def root401 = get("/payments") { …
mirandes
  • 957
  • 10
  • 10