Compile works when deployed, but not during precompilation when referring to 'session' in SSP
Hi there,
We've been using SSPs in our project, and want to precompile them before deploying them. We ran into an issue where the SSP would compile fine when deployed using scalatra in a container but fail to compile.
We investigated this and we were using some objects made available by org.scalatra.ScalatraContext (specifically "session"). When running the pre-compile, I think it must only use the object instances made available by ServletRenderContext.
Steps to reproduce:
This is not a blocking issues as there are some workarounds. Namely, instead of in the SSP referring to session directly, we can use "request.getSession"
Let me know if you need any more information. Not sure if this is an intentional thing or not.
We've been using SSPs in our project, and want to precompile them before deploying them. We ran into an issue where the SSP would compile fine when deployed using scalatra in a container but fail to compile.
We investigated this and we were using some objects made available by org.scalatra.ScalatraContext (specifically "session"). When running the pre-compile, I think it must only use the object instances made available by ServletRenderContext.
Steps to reproduce:
- Create an SSP that refers to the "session" instance, or "params" in ScalatraContext
- Run a maven precompile
This is not a blocking issues as there are some workarounds. Namely, instead of in the SSP referring to session directly, we can use "request.getSession"
Let me know if you need any more information. Not sure if this is an intentional thing or not.
Leave a comment