lift

Lift filter to force ssl

天涯浪子 提交于 2019-12-04 13:53:33
问题 in a struts application, I have a filter that forces certain pages to be accessed only over https via redirection. I'm thinking in porting it to lift so my question is: In the this environment, is there a "lift" way to implement such filter or is it similar/the same as in struts ? Thanks 回答1: In Lift, the SiteMap defines the rules for page access. You can create a SiteMap entry that does a Redirect to the https site on certain pages: // create an object that does a redirect to the https

lift import net.liftweb returns an error “not found: value net”

走远了吗. 提交于 2019-12-04 12:07:31
I'm new with scala and lift but I already got the pocketchangeapp up and running and playing around with the RestAPI thing in it. Now I created a new project and it worked quite well until last night. I made my latest changes and commited them in svn but hat a problem with my workspace so I deleted my projects and did a checkout of the Project in svn. Since I did that my imports of net.liftweb._ (any classes also if I write the exact class name) only return an error in eclipse: import net.liftweb._ gives me "not found: value net" I checked again all dependencies in the pom.xml but I cannot

Lift - Autocomplete with Ajax Submission

隐身守侯 提交于 2019-12-04 11:04:39
问题 I would like to use an autocomplete with ajax. So my goal is to have: When the user types something in the text field, some suggestions provided by the server appear (I have to find suggestions in a database) When the user presses "enter", clicks somewhere else than in the autocomplete box, or when he/she selects a suggestion, the string in the textfield is sent to the server. I first tried to use the autocomplete widget provided by lift but I faced three problems: it is meant to be an

Best way to create a login/logout form in Scala using Lift

隐身守侯 提交于 2019-12-04 07:06:43
As more and more people are interested in Scala (like myself), rather than a question, I'd like to discuss one implementation of a login/logout snippet for a webapp based on Lift . I just started to learn Scala and Lift so it's probably not the best way to implement such a feature but I'd like to share it for other beginners and discuss it with more experienced developers. Please note that I'm also not an expert in web development. Any help for improvements would be greatly appreciated (especially performance and security related ones) ;-) 1) First of all, the snippet needs to be easily

Deserializing case classes with Map[String,Any] properties with lift-json

旧巷老猫 提交于 2019-12-04 05:57:18
I've been struggling with something that should be simple through lift-json for days: serializing a map to JSON. I know, I know – "Root object can't yet be List or Map" – but I'm willing to wrap in a case class for now, and I still haven't been able to get this to work. Thanks to some stack overflow help, I've got serialization working, but I can't deserialize it from a string. I get errors like "No usable value for _ " and "No information known about type." There are other, older posts on the web that indicate type hints are the answer, but that just leads to a different error like "Do not

Scala and Java in same project

£可爱£侵袭症+ 提交于 2019-12-04 05:46:20
Can I use Scala and Java in the same project? I am new with programming so it's a litte bit confusing for me. From my research I have read that the best combination to get a good project is the combination Java/Spring or Scala/Lift. Why do these combinations exist? Is it not possible to use Scala with Spring or Java with Lift? In case I use Scala, should I have the whole configuration in Scala code? Or can I have external resources so I shouldn't modify every time the Scala code. Q. Can I use Scala and Java in the same project? Sure, you can. You can use most of the JVM based languages

IntelliJ IDEA doesn't load Lift libraries from a SBT project

孤人 提交于 2019-12-04 04:01:42
I've created a blank project via sbt using the most basic guide, specifically: > cd xyz > sbt # here we create a new project w/ Scala 2.8.1 > *lift is org.lifty lifty 1.6.1 > lift create project-blank however when I open the project in IntelliJ, it doesn't correctly recognize .jars downloaded via sbt. All imports are red and when I go to project settings ( Ctrl + Alt + Shift + S ) in Libraries section, they are all greyed out. Apart from that, the project sources are correctly recognized as Scala project with a Web facet Did I forget to configure something? I've already tried to create a

Reverse AJAX (Comet) and Spring MVC vs. Scala/LIFT?

半世苍凉 提交于 2019-12-03 23:01:43
There is a demo by IBM that shows how easy Reverse AJAX can be used with DWR 2. On the other hand, Scala/LIFT comes with built-in Reverse AJAX capability. Question: Any experience if this works fine with Spring MVC? Question: If you'd start from scratch, what are the pros and cons for preferring Scala/LIFT over DWR/Spring MVC Question: In Scala/LIFT, is the security handling as sophisticated as in Spring Security? Lift's Comet Architecture which was selected by Novell to power their Pulse product after they evaluated a number of different technologies. Lift's Comet implementation uses a single

How to create stand-alone lift web application?

徘徊边缘 提交于 2019-12-03 15:24:01
How to make a standalone lift application? Which tools/libraries to use? How does the performance compare to using lift application as a war in some application server? With onejar maven plugin http://onejar-maven-plugin.googlecode.com/svn/mavensite/usage.html and maven I could package jetty and project with dependencies inside one jar. SteveD The part of the question on performance doesn't really fit with the rest. You are primarily asking how to package the Lift application as a single JAR/WAR. This doesn't have anything to do with the runtime. At runtime you will still be running inside a

Extracting lift-json into a case class with an upper bound

匆匆过客 提交于 2019-12-03 14:20:00
I have spent the last day searching and reading various sites and articles to try to find the answer to this question myself and I haven't found anything that helps. I'm not even sure if this is feasible. My problem is that I am trying to parse and extract a Json Response using lift-json. The response consists of 4 parts, where the first 3 parts are always the same for every response to every type of request I make. The last part varies depending on the type of request, but it is always going to be a list of some type. I was hoping to do something like this: abstract class MyObjects case class