[Lift] More on bind and preserving attributes
Hi, I know this has been discussed somewhat at length (e.g. here http://groups.google.com/group/liftweb/browse_thread/thread/27aed5f45faf759/a261a2dfe0ae7207?lnk=gstq=attributes+bind#a261a2dfe0ae7207) but I still think the default behaviour of - should be reconsidered if at all possible. Here's why: I went through our app fixing small UI annoyances. One is missing tab index on input fields. I knew this has been working previously. Template: olli label for=email{S.??(email.address)}/label user:email user:tabindex=1/ /lili label for=password{S.??(password)} (a href={lostPasswordPath.mkString(/, /, )}{S.??(recover.password)}/a)/label user:password user:tabindex=2/ /li /ol Code: bind(user, loginXhtml, email - (FocusOnLoad(input type=text name=username id=email class=text/)), password - (input type=password class=password id=password name=password/), submit - (input type=submit class=submit value={S.??(log.in)}/)) Note the user:tabindex attribute which used to emit a tabindex attribute in the HTML (this has been changed cf. the conversation above) I can now change user:tabindex to tabindex and - to -% and I get the tabindex parameter emitted. There are a few problems with this: 1) It doesn't work for the email field since it doesn't bind an Elem but a NodeSeq (so -% wouldn't now where to attach the attributes. You could attach the attributes to the first elem in the NodeSeq (which would work here), but this doesn't sound like a nice general solution) 2) I have to change my code if I need to introduce attributes on the rendered elem (ignore the fact that my template code already contains a class attr :-) 3) To change the email field, I came up with this which seems rather verbose, but perhaps there's a better way? email - {_:NodeSeq = val n = BindHelpers.currentNode openOr scala.xml.NodeSeq.Empty (FocusOnLoad(mixinAttributes (input type=text name=username id=email class=text/)(n).first.asInstanceOf[Elem]))}, Because of 2) I'm tempted to always use -% in bind. I would like UI info to be editable by our UI guy without having to change code when introducing new attributes. But If I use -% always, it might as well be the default mode of operation :-) But maybe I'm the only person with such needs? Imo, it boils down to the fact that I frequently need to specify attributes in the markup code but have to either 1) anticipate this up front in the binding or 2) Change both markup and code when a change is introduced. I'm not sure what the best solution is but to me it looks like the problem that needs solving is where to attach the attributes specified in the markup? Before trying to solve this I'm interested in gauging the possibility of changing this at all :-) /Jeppe -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Building war for production mode.
Hello, I'm trying to first test deploy of my app :) I created package (mvn package), uploaded created war as root.war in webapp folder of jetty server and when running app it looks that lift app is running in development mode (no 404 is showed but: The requested page was not defined in your SiteMap, so access was blocked. (This message is displayed in development mode only How inform maven that I'm building production package ? I tried mvn -Drun.mode=production package - no effect ? Best regards, -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Broken 1.1-M7 jpa archetypes
Fixed in snapshot repo :) The following command should give you a good project now. mvn archetype:generate -DarchetypeRepository=http://scala-tools.org/ repo-snapshots -DremoteRepositories=http://scala-tools.org/repo- snapshots -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift- archetype-jpa-basic -DarchetypeVersion=1.1-SNAPSHOT - DgroupId=com.mypackage -DartifactId=myproject -Dversion=1.0-SNAPSHOT Cheers, Indrajit On Nov 25, 3:23 am, David Pollak feeder.of.the.be...@gmail.com wrote: Yes. This is a known issue. Seehttp://github.com/dpp/liftweb/issues#issue/161 On Tue, Nov 24, 2009 at 9:34 AM, Oscar Picasso oscarpica...@gmail.comwrote: It seems that 1.1-M7 jpa archetypes other than lift-archetype-jpa-basic are broken, both in snapshots and releases repositories. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Building war for production mode.
Marcin Jurczuk mjurc...@gmail.com writes: Hello, I'm trying to first test deploy of my app :) I created package (mvn package), uploaded created war as root.war in webapp folder of jetty server and when running app it looks that lift app is running in development mode (no 404 is showed but: The requested page was not defined in your SiteMap, so access was blocked. (This message is displayed in development mode only How inform maven that I'm building production package ? I tried mvn -Drun.mode=production package - no effect ? You don't build for deployment, it is the same war (modulus any compiler settings or other build steps you've specified) The lift run mode is determined at runtime, so you need to specify the run.mode=production as a system property when launching jetty (This is what happens with the maven command above: It starts jetty with this system property set) If you happen to run jetty on a Debian based Linux you can accomplish this by: echo JAVA_OPTIONS=-Drun.mode=production /etc/default/jetty6 /Jeppe -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Binding error in Ajax call : how to debug ?
Hello, When I use bind(namespace, template, bindings*) in an Ajax call, if there is a binding error (for example, a misspelled word in the template), I can't see any error, nor in the web broswer as it the case for such error outside Ajax Call, nor in the console log. I know that I can use firebug to see the Ajax response, and dig in it to search for not XHTML tags, but as I'm just begining with Lift, I was wondering if there is a rule or something to enable such error to be displayed in a much more visible fashion when I'm in developpement mode ? Thanks in advance ! PS: I use Lift 1.1-SNAPSHOT -- Francois ARMAND http://fanf42.blogspot.com -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Refactoring Round 2
Folks, In continuation to the refactoring initiative and following up on the discussion that we had on the last committers call, here we have the next round of broad based project structure refactoring proposal. This is themed around the idea of splitting the build system into separate smaller 'projects' with clearly demarcated responsibilities between them. In the way, these projects can have independent life-cycles on their own without coming in the way of each other (but still continue to have a dependency hierarchy). Here are the set of projects to begin with: 1. framework (http://github.com/dpp/liftweb/tree/branch/framework): The regular Lift as we have today (minus lift-archetype, lift- examples, lift-misc). Thus we would have: framwork/pom.xml framwork/lift-base framwork/lift-persistence framwork/lift-modules 2. archetypes (http://github.com/dpp/liftweb/tree/branch/ archetypes): The lift-archetypes from Liftweb. archetypes/pom.xml archetypes/lift-archetype-blank archetypes/lift-archetype-basic archetypes/lift-archetype-jpa-blank-single archetypes/lift-archetype-jpa-blank archetypes/lift-archetype-jpa-basic 3. examples (http://github.com/dpp/liftweb/tree/branch/examples): The lift-archetypes from Liftweb. The big uptake for archetypes and examples is the reduction of build time for building full Lift. Individuals building Lift might not always be interested in building non ancillary packages like lift-archetypes and lift-examples. examples/pom.xml examples/example1 examples/example2 4. resources (http://github.com/dpp/liftweb/tree/branch/resources: 4a. project-parent: A pure POM based project to be canonically used by all Lift family of projects (liftweb, lift-archetype, lift-examples etc.). Lot of what has gone in liftweb/pom.xml should get moved here. Obviously, this would contain the most generic configuration that holds true for all projects of Lift (#1, #2, #3). 4b. site-skin: Lift specific site skin instead of relying on org.scala- tools.skins:scala-skin-simple 5. references (http://github.com/dpp/liftweb/tree/branch/ references): Lift documentations and presentations. These don't need to show up in the project hierarchy in the IDE. 6. installer (http://github.com/dpp/liftweb/tree/branch/installer): The usual lift-installer that is tucked inside lift-misc. Again, these are unnecessarily showing up in the project hierarchy in the IDE. I am floating the idea beforehand and would be keen to have input from committers, the pros and cons and any other general feedback before proceeding. Thoughts would be very welcome :) Cheers, Indrajit -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Lift and LDAP
http://jgoday.wordpress.com/2009/11/27/lift-ldap/ One of the requisites to start using Lift at my work, was to use LDAP authentification. So i wrote a little module lift-ldap for that and a sample app, it was damn simple! http://github.com/jgoday/lift-ldap http://github.com/jgoday/sample_lift_ldap -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Refactoring Round 2
Excellent proposal! Heiko On Friday, November 27, 2009, Indrajit Raychaudhuri indraj...@gmail.com wrote: Folks, In continuation to the refactoring initiative and following up on the discussion that we had on the last committers call, here we have the next round of broad based project structure refactoring proposal. This is themed around the idea of splitting the build system into separate smaller 'projects' with clearly demarcated responsibilities between them. In the way, these projects can have independent life-cycles on their own without coming in the way of each other (but still continue to have a dependency hierarchy). Here are the set of projects to begin with: 1. framework (http://github.com/dpp/liftweb/tree/branch/framework): The regular Lift as we have today (minus lift-archetype, lift- examples, lift-misc). Thus we would have: framwork/pom.xml framwork/lift-base framwork/lift-persistence framwork/lift-modules 2. archetypes (http://github.com/dpp/liftweb/tree/branch/ archetypes): The lift-archetypes from Liftweb. archetypes/pom.xml archetypes/lift-archetype-blank archetypes/lift-archetype-basic archetypes/lift-archetype-jpa-blank-single archetypes/lift-archetype-jpa-blank archetypes/lift-archetype-jpa-basic 3. examples (http://github.com/dpp/liftweb/tree/branch/examples): The lift-archetypes from Liftweb. The big uptake for archetypes and examples is the reduction of build time for building full Lift. Individuals building Lift might not always be interested in building non ancillary packages like lift-archetypes and lift-examples. examples/pom.xml examples/example1 examples/example2 4. resources (http://github.com/dpp/liftweb/tree/branch/resources: 4a. project-parent: A pure POM based project to be canonically used by all Lift family of projects (liftweb, lift-archetype, lift-examples etc.). Lot of what has gone in liftweb/pom.xml should get moved here. Obviously, this would contain the most generic configuration that holds true for all projects of Lift (#1, #2, #3). 4b. site-skin: Lift specific site skin instead of relying on org.scala- tools.skins:scala-skin-simple 5. references (http://github.com/dpp/liftweb/tree/branch/ references): Lift documentations and presentations. These don't need to show up in the project hierarchy in the IDE. 6. installer (http://github.com/dpp/liftweb/tree/branch/installer): The usual lift-installer that is tucked inside lift-misc. Again, these are unnecessarily showing up in the project hierarchy in the IDE. I am floating the idea beforehand and would be keen to have input from committers, the pros and cons and any other general feedback before proceeding. Thoughts would be very welcome :) Cheers, Indrajit -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Heiko Seeberger My job: weiglewilczek.com My blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala: scalamodules.org Lift, the simply functional web framework: liftweb.net -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Oracle DB connection in 1.1-m7
I should have a fix in 30 minutes or so. On Thu, Nov 26, 2009 at 9:56 AM, Mathias Sulser s...@suls.org wrote: I think the MappedBoolean isn't properly done in the OracleDriver: scala User.findAll(By(User.superUser, false)) java.sql.SQLException: Invalid column type at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:146) at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:208) at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical (OraclePreparedStatement.java:9168) at ora... And if you look at the generated DDL: CREATE TABLE USERS ( ... SUPERUSER decimal(22), ... ); Any hints on how to solve this? Btw, it's a 10g data base On Nov 26, 4:14 pm, Mathias Sulser s...@suls.org wrote: All right. Figuring out the proper JDBC string was all. Schemifyer seems to then pick the right driver and produce DDL for the specific DB. Great stuff. On Nov 26, 3:17 pm, suls s...@suls.org wrote: Hi, I see that there is a DriverType and OracleDriver in 1.1-m7 but again I don't know how to connect the dots. How would a DB.defineConnectionManager method call that uses an oracle db look like? Thanks, suls -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] More on bind and preserving attributes
I'm not sure if this addresses your points, but I figured I'd throw out what I've been doing in case it helps. I don't use -%, but I do use something similar along with another implicit so I can place the attrs in exactly the right place, and it automagically combines class and style attributes correctly. Some example code: bind(user, loginXhtml, email - (FocusOnLoad(input type=Text name=username id=email class=text / %% currentPrefixedAttrs(input)), ...) The %% is a method on an extension of Elem which knows how to combine MetaData like %, but properly handles combining style= and class= attributes. currentPrefixedAttrs is a helper method that collects all the attributes of the current binding node with a given prefix and strips the prefix, basically like S.prefixedAttrsToMetaData, but for the current binding node instead of the current snippet node. This is fairly brief, does not have the same which Elem problems that -% might since you specifically annotate where you want the attributes to go, does not have the problem with class= and style= attributes. I think personally that the default behavior of bind is correct and least surprising, since (at least for me and the applications I have) it's very common that a single bound tag does not map one to one to a result elem. I'm not sure what the general policy on utility-style stuff like this, but if there's a desire, I can contribute it into the lift codebase. Here's currentPrefixedAttrs and it's helpers: object XMLHelpers { /** Transform all attributes of a element with the given prefix to unprefixed attributes with the same values, discarding any other attributes */ def prefixedAttrsToUnprefixed(prefix: String)(attrs: MetaData): MetaData = stripPrefixes(attrs.filter(attrsWithPrefix(prefix))) /** Strip prefixes from prefixed attributes, leaving unprefixed attributes */ def stripPrefixes(in: MetaData): MetaData = in.foldLeft[MetaData] (Null) { (rest, md) = md match { case pa: PrefixedAttribute = new UnprefixedAttribute (pa.key, pa.value, rest) case upa: UnprefixedAttribute = new UnprefixedAttribute (upa.key, upa.value, rest) case Null = rest case x = throw new IllegalArgumentException(Not sure how to process + x + (of type + x.getClass.getName + )) } } /** A filtering function which matches any prefixed attribute with a given prefix */ def attrsWithPrefix(pre: String)(md: MetaData): Boolean = md match { case pa: PrefixedAttribute if pa.pre == pre = true case _ = false } /** Implicitly convert an Elem to a ElemExtension to enable additional functionality */ implicit def elemToElemExtension(e: Elem): ElemExtension = ElemExtension(e) /** Like {...@link MetaData#update} but instead of overwriting class and style attributes, the values are combined with an appropriate format for those attributes. Other attributes are overwrriten per usual. */ def combineMetaData(md1: MetaData, md2: MetaData, scope: NamespaceBinding): MetaData = { def notClassNorStyle(md: MetaData) = md.key match { case (class|style) = false; case _ = true } def classAttr(tail: MetaData) = (md1(class), md2(class)) match { case (null, null) = tail case (a , null) = new UnprefixedAttribute(class, Text (a.text), tail) case (null, b ) = new UnprefixedAttribute(class, Text (b.text), tail) case (a , b ) = new UnprefixedAttribute(class, Text (a.text + + b.text), tail) } def styleAttr(tail: MetaData) = (md1(style), md2(style)) match { case (null, null) = tail case (a , null) = new UnprefixedAttribute(style, Text (a.text), tail) case (null, b ) = new UnprefixedAttribute(style, Text (b.text), tail) case (a , b ) = new UnprefixedAttribute(style, Text (a.text + ; + b.text), tail) } MetaData.update(md1.filter(notClassNorStyle), scope, classAttr (styleAttr(md2.filter(notClassNorStyle } } /** Extension on Elem that adds helpful behavior */ case class ElemExtension(e: Elem) { import XMLHelpers.combineMetaData /** Generate a new Elem with the given additional metadata like Elem's % operator, but uses {...@link XMLHelpers#combineMetaData} instead of {...@link MetaData#update} */ def %%(updates: MetaData): Elem = Elem(e.prefix, e.label, combineMetaData(e.attributes, updates, e.scope), e.scope, e.child: _*) } -Ross On Nov 27, 2009, at 5:05 AM, Jeppe Nejsum Madsen wrote: Hi, I know this has been discussed somewhat at length (e.g. here http://groups.google.com/group/liftweb/browse_thread/thread/27aed5f45faf759/a261a2dfe0ae7207?lnk=gstq=attributes+bind#a261a2dfe0ae7207 ) but I still think the default behaviour of - should be reconsidered
Re: [Lift] How to get the servlet context
A way you can get the Servlet context is like this: LiftRules.context match { case context: HTTPServletContext = // do something with context.ctx which is the javax.servlet.ServletContext case _ = // do something when the context is not a servlet context, perhaps log an error } The reason you need the match is because Lift can run on non-servlet web containers, so Lift does not guarantee there is a Servlet context in scope. Hope that helps, -Ross On Nov 27, 2009, at 10:51 AM, jhonig wrote: LS, After Ross' kind invitation to post any other questions I might have, I'll start with this one: The web application I am developing needs a scratch directory to white scaled images to. I first try to use a subdir of /tmp and put a symbolic link in place to access that directory from my project's context. However, this got me an error message (something about an aliased resource), so after some searching around I decided the best way is to create a directory inside WEF-INF and access it through getServletContext ().getRealPath (/...). From the APIdocs I found out that an instance of a ServiceContext is passed to HTTPServletContext, but I haven't been able to find if that is the instance I need, or how to get an instance of HTTPServletContext... Note: I am currently able to read/write temporary finds when running through mvn getty:run, but I need a solution that still works when I deploy a war with an existing jetty server. Thanks for any hints! Job Honig -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en . -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Lift and LDAP
That is amazing :) Probably I will need to bind to AD in near future, so this module is like fallen from heavens :) On 27 Lis, 15:11, TylerWeir tyler.w...@gmail.com wrote: http://jgoday.wordpress.com/2009/11/27/lift-ldap/ One of the requisites to start using Lift at my work, was to use LDAP authentification. So i wrote a little module lift-ldap for that and a sample app, it was damn simple! http://github.com/jgoday/lift-ldaphttp://github.com/jgoday/sample_lift_ldap -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: How to get the servlet context
Thanks Ross, I will try this! Is there a generic way to get to a kind of sandbox directory where snippets can read/write files? Job On Nov 27, 5:12 pm, Ross Mellgren dri...@gmail.com wrote: A way you can get the Servlet context is like this: LiftRules.context match { case context: HTTPServletContext = // do something with context.ctx which is the javax.servlet.ServletContext case _ = // do something when the context is not a servlet context, perhaps log an error } The reason you need the match is because Lift can run on non-servlet web containers, so Lift does not guarantee there is a Servlet context in scope. Hope that helps, -Ross On Nov 27, 2009, at 10:51 AM, jhonig wrote: LS, After Ross' kind invitation to post any other questions I might have, I'll start with this one: The web application I am developing needs a scratch directory to white scaled images to. I first try to use a subdir of /tmp and put a symbolic link in place to access that directory from my project's context. However, this got me an error message (something about an aliased resource), so after some searching around I decided the best way is to create a directory inside WEF-INF and access it through getServletContext ().getRealPath (/...). From the APIdocs I found out that an instance of a ServiceContext is passed to HTTPServletContext, but I haven't been able to find if that is the instance I need, or how to get an instance of HTTPServletContext... Note: I am currently able to read/write temporary finds when running through mvn getty:run, but I need a solution that still works when I deploy a war with an existing jetty server. Thanks for any hints! Job Honig -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com . For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en . -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] derby
Derby has inferior support for binary data types (32k limit) and has a couple of other issues that I can't remember off the top of my head. On Thu, Nov 26, 2009 at 1:54 PM, jlist9 jli...@gmail.com wrote: Hi David, Would you care to elaborate in what way Derby is inferior? I understand H2 is probably faster as speed is one of its main design goals. Does Derby have any other issues? Are there any potential issues with using H2 for production? Thanks, Jack Derby is inferior in every way to H2 (another open source pure Java relational database). If you're building something for production, Postgresql is your best choice. If you need a simple database that needs no separate process and just works H2 is your best choice. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] How to get the servlet context
According to the Servlet spec each webapp has got a private temporary directory. I cannot remember exactly how to get this, maybe ServletContext.getTmpDir(). Please take a look at the spec. Heiko On Friday, November 27, 2009, jhonig al...@xs4all.nl wrote: Thanks Ross, I will try this! Is there a generic way to get to a kind of sandbox directory where snippets can read/write files? Job On Nov 27, 5:12 pm, Ross Mellgren dri...@gmail.com wrote: A way you can get the Servlet context is like this: LiftRules.context match { case context: HTTPServletContext = // do something with context.ctx which is the javax.servlet.ServletContext case _ = // do something when the context is not a servlet context, perhaps log an error } The reason you need the match is because Lift can run on non-servlet web containers, so Lift does not guarantee there is a Servlet context in scope. Hope that helps, -Ross On Nov 27, 2009, at 10:51 AM, jhonig wrote: LS, After Ross' kind invitation to post any other questions I might have, I'll start with this one: The web application I am developing needs a scratch directory to white scaled images to. I first try to use a subdir of /tmp and put a symbolic link in place to access that directory from my project's context. However, this got me an error message (something about an aliased resource), so after some searching around I decided the best way is to create a directory inside WEF-INF and access it through getServletContext ().getRealPath (/...). From the APIdocs I found out that an instance of a ServiceContext is passed to HTTPServletContext, but I haven't been able to find if that is the instance I need, or how to get an instance of HTTPServletContext... Note: I am currently able to read/write temporary finds when running through mvn getty:run, but I need a solution that still works when I deploy a war with an existing jetty server. Thanks for any hints! Job Honig -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com . For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en . -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Heiko Seeberger My job: weiglewilczek.com My blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala: scalamodules.org Lift, the simply functional web framework: liftweb.net -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] derby
I see. Thanks Derek. On Fri, Nov 27, 2009 at 8:42 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: Derby has inferior support for binary data types (32k limit) and has a couple of other issues that I can't remember off the top of my head. On Thu, Nov 26, 2009 at 1:54 PM, jlist9 jli...@gmail.com wrote: Hi David, Would you care to elaborate in what way Derby is inferior? I understand H2 is probably faster as speed is one of its main design goals. Does Derby have any other issues? Are there any potential issues with using H2 for production? Thanks, Jack Derby is inferior in every way to H2 (another open source pure Java relational database). If you're building something for production, Postgresql is your best choice. If you need a simple database that needs no separate process and just works H2 is your best choice. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: How to get the servlet context
Dear Heiko, According to the Servlet spec each webapp has got a private temporary directory. I cannot remember exactly how to get this, maybe ServletContext.getTmpDir(). Please take a look at the spec. I started reading the spec, but didn't find it yet. ServletContext doesn't have any obvious way to get to a temporary dir, but I assumed I could create one. Would probably need to tweak a security policy to be able to write to it, but that would be the next step. Job H. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: How to get the servlet context
File tempdir = (File) config.getServletContext().getAttribute(javax.servlet.context.tempdir) 2009/11/27 jhonig al...@xs4all.nl Dear Heiko, According to the Servlet spec each webapp has got a private temporary directory. I cannot remember exactly how to get this, maybe ServletContext.getTmpDir(). Please take a look at the spec. I started reading the spec, but didn't find it yet. ServletContext doesn't have any obvious way to get to a temporary dir, but I assumed I could create one. Would probably need to tweak a security policy to be able to write to it, but that would be the next step. Job H. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Heiko Seeberger My job: weiglewilczek.com My blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala: scalamodules.org Lift, the simply functional web framework: liftweb.net -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] derby
Anything larger than 32k should probably be a BLOB anyway (for which Derby has full support). However, I'm going to take a look at H2 anyway. On Fri, Nov 27, 2009 at 11:42 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: Derby has inferior support for binary data types (32k limit) and has a couple of other issues that I can't remember off the top of my head. On Thu, Nov 26, 2009 at 1:54 PM, jlist9 jli...@gmail.com wrote: Would you care to elaborate in what way Derby is inferior? I understand H2 is probably faster as speed is one of its main design goals. Does Derby have any other issues? Are there any potential issues with using H2 for production? Derby is inferior in every way to H2 (another open source pure Java relational database). If you're building something for production, Postgresql is your best choice. If you need a simple database that needs no separate process and just works H2 is your best choice. -- Family photographs are a critical legacy for ourselves and our descendants. Protect that legacy with a digital backup and recovery plan. Join the photo preservation advocacy Facebook group: http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288 -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Newbie Question: Problems compiling/running examples
Again, thanks for the quick response -- finally got it! Here's what I did and what ended up being the problem (maybe an obvious one, but wasn't to me since I'm new to scala/lift): 1. Ran 'git pull' then 'git reset --hard' 2. Ran 'mvn clean install' from liftweb root 3. Several projects built fine, but I got a compile failure building the examples. The full maven output is listed below. 4. I thought, Hmmm. This build obviously works for the Lift guys. What is possibly different about their environment? Scala! For giggles downloaded Scala 2.7.7 and put in my path. 5. Re-ran 'mvn clean install' from the root and everything worked. So for noobs such as myself, the following things were needed in addition to Maven: 1. increase the default Maven heap size. This is pretty easy, but I also use Maven all the time. For someone new to Maven, this might not be obvious: export MAVEN_OPTS=-Xmx1024m 2. Download Scala 2.7.7 and put it in the path. This is not obvious because the build sort of works without it (I guess the Maven scala plugin does the compilation?). Again, good response time on the help. That is important -- I'm evaluating Grails, Roo, and Lift as potential options for a project. I'm a Java dev, so Grails/Roo is easy. I like what I've seen so far from Lift, but I'll also probably have a lot of dumb questions since I'm new to scala, so it is important to have a responsive community and that seems like that's what you've got. Just for reference, here's the Maven output prior to putting scala in the path: [INFO] [INFO] Building Lift Example [INFO]task-segment: [install] [INFO] [INFO] [enforcer:enforce {execution: default-enforce}] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/JoelC/work/projects/ lift/liftweb/lift-examples/example/src/main/resources [INFO] [scala:compile {execution: scala-compile}] [INFO] Checking for multiple versions of scala [INFO] includes = [**/*.scala,**/*.java,] [INFO] excludes = [] [INFO] Compiling 2 source files to /Users/JoelC/work/projects/lift/ liftweb/lift-examples/example/target/classes /Users/JoelC/work/projects/lift/liftweb/lift-examples/example/src/main/ scala/bootstrap/liftweb/Boot.scala:47: error: not found: value definedLocale LiftRules.localeCalculator = r = definedLocale.openOr (LiftRules.defaultLocaleCalculator(r)) ^ /Users/JoelC/work/projects/lift/liftweb/lift-examples/example/src/main/ scala/bootstrap/liftweb/Boot.scala:51: error: not found: value User Schemifier.schemify(true, Log.infoF _, User, WikiEntry, Person) ^ /Users/JoelC/work/projects/lift/liftweb/lift-examples/example/src/main/ scala/bootstrap/liftweb/Boot.scala:54: error: not found: value WebServices WebServices.init() ^ /Users/JoelC/work/projects/lift/liftweb/lift-examples/example/src/main/ scala/bootstrap/liftweb/Boot.scala:56: error: not found: value XmlServer XmlServer.init() ^ /Users/JoelC/work/projects/lift/liftweb/lift-examples/example/src/main/ scala/bootstrap/liftweb/Boot.scala:60: error: not found: value LoginStuff if !LoginStuff.is page.head != validate = ^ /Users/JoelC/work/projects/lift/liftweb/lift-examples/example/src/main/ scala/bootstrap/liftweb/Boot.scala:65: error: not found: value Template (Map(Template - Template, ^ /Users/JoelC/work/projects/lift/liftweb/lift-examples/example/src/main/ scala/bootstrap/liftweb/Boot.scala:73: error: not found: value RuntimeStats LiftRules.snippetDispatch.append(Map(runtime_stats - RuntimeStats)) ^ /Users/JoelC/work/projects/lift/liftweb/lift-examples/example/src/main/ scala/bootstrap/liftweb/Boot.scala:97: error: not found: value ThingBuilder ThingBuilder.boot() ^ /Users/JoelC/work/projects/lift/liftweb/lift-examples/example/src/main/ scala/bootstrap/liftweb/Boot.scala:167: error: not found: value WikiStuff Menu(WikiStuff) :: ^ /Users/JoelC/work/projects/lift/liftweb/lift-examples/example/src/main/ scala/bootstrap/liftweb/Boot.scala:279: error: not found: value RuntimeStats RuntimeStats.lastUpdate = timeNow ^ /Users/JoelC/work/projects/lift/liftweb/lift-examples/example/src/main/ scala/bootstrap/liftweb/Boot.scala:280: error: not found: value RuntimeStats RuntimeStats.totalMem = rt.totalMemory ^ /Users/JoelC/work/projects/lift/liftweb/lift-examples/example/src/main/ scala/bootstrap/liftweb/Boot.scala:281: error: not found: value RuntimeStats RuntimeStats.freeMem = rt.freeMemory ^ /Users/JoelC/work/projects/lift/liftweb/lift-examples/example/src/main/
Re: [Lift] derby
On Thu, Nov 26, 2009 at 12:54 PM, jlist9 jli...@gmail.com wrote: Hi David, Would you care to elaborate in what way Derby is inferior? I understand H2 is probably faster as speed is one of its main design goals. Does Derby have any other issues? I needed to do a lot more work arounds for Derby in Mapper/Schemifier... H2 was more true to the SQL spec. I have had a few instances of Derby databases getting corrupt during unclean shutdowns... that's never happened with H2. Are there any potential issues with using H2 for production? Thanks, Jack Derby is inferior in every way to H2 (another open source pure Java relational database). If you're building something for production, Postgresql is your best choice. If you need a simple database that needs no separate process and just works H2 is your best choice. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: how does lift work with redis?
2009/11/27 Jim Barrows jim.barr...@gmail.com 2009/11/26 surfman chinasmile...@gmail.com So, if I want to use nosql database with LIFT, what I have to use is JDBC driver, am I right? Any experienced suggestion? Google has very little searching result on it. I'd appreciate any idea on this topic. Thanks. No, you can use whatever Java driver the nosql database comes with. If the nosql database has a JDBC driver, then you might find it easier to use one of the Java ORM systems that support it. However, JDBC is pretty much a SQL thing, so that might be difficult. Using a nosql database means that you don't have access to some of the built in features that Mapper and Record give you for data mapping, and form generation, but you should still be able to use Lift quite easily. Record is not tied to SQL. One should be able to write a bridge from Record to a NoSQL DB. Regards, Surfman On 11月25日, 下午4时06分, Timothy Perrett timo...@getintheloop.eu wrote: Correct - Redis is a nosql database, mapper is only for RDBMS Cheers, Tim On 25 Nov 2009, at 20:13, surfman wrote: Thanks. Does it mean I may not use lift mapper and I have to write everything for database manipulation? regards, surfman On 11月24日, 下午5时12分, Timothy Perrett timo...@getintheloop.eu wrote: There is no out of the box implementation. You could write a record back end though - it depends on the features you want I guess. Cheers, Tim Sent from my iPhone On 24 Nov 2009, at 22:00, surfman chinasmile...@gmail.com wrote: Is there anything I could learn on how lift works with redis database? Thanks. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/liftweb?hl=en .- 隐藏被引用文字 - - 显示引用的文字 - -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/liftweb?hl=en.- 隐藏被引用文字 - - 显示引用的文字 - -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- James A Barrows -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] derby
That's good to know. Thanks! On Fri, Nov 27, 2009 at 10:50 AM, David Pollak feeder.of.the.be...@gmail.com wrote: I needed to do a lot more work arounds for Derby in Mapper/Schemifier... H2 was more true to the SQL spec. I have had a few instances of Derby databases getting corrupt during unclean shutdowns... that's never happened with H2. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Impossible to use Mapper on GAE?
Still seeking an answer. I notice that the lift GAE example has a database demo. Does it use Mapper and read from/write to bigtable? http://lift-example.appspot.com/database On Thu, Nov 26, 2009 at 12:51 PM, jlist9 jli...@gmail.com wrote: Hi, I read from the list that Mapper is not supported on Google App Engine (I see people use JPA instead.) I wonder if this is a matter of non-existent drivers, or there are some fundamental issues that make it impossible? Thanks, Jack -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
RE: [Lift] Re: overriding ConnectionManager.newSuperConnection
Yeah, IIRC what happened was that it was trying to read tables from the schema with the user's name (assuming it was the default) while when it actually created them they went into the actual default, PUBLIC. I think this resulted in Schemifier trying to create tables that existed maybe. So the real fix was setting the H2 DriverType default schema to PUBLIC, as we realized only later. -Original Message- From: David Pollak feeder.of.the.be...@gmail.com Sent: Tuesday, November 24, 2009 9:32 AM To: liftweb@googlegroups.com Subject: Re: [Lift] Re: overriding ConnectionManager.newSuperConnection On Tue, Nov 24, 2009 at 6:24 AM, opyate opy...@gmail.com wrote: Hi David, I did work around this by putting the schemas in my search path. Edit postgresql.conf and add the following: search_path = '$user,public,schema1,schema2,schemaN' As for this being a bug... did you intend for Mapper to support schemas on the CRUD side? The support for schemas in schemifier was a special-case fix for, if I remember correctly, something relating to H2 and the way H2 user names are related to something. I think the short answer is that we're not going to explicitly support schemas in Mapper. If you need a more complete ORM, please use JPA. Sorry. If so, I'd be happy to create a repro. BUT it can quite easily be reproduced by taking an existing project and moving an existing table into a schema: $ psql yourdb yourdb=# create schema someschema; CREATE SCHEMA yourdb=# alter table user set schema someschema; ALTER TABLE Now relaunch your app, and you'll see some issues with the user table. Previously I had to alter my User companion object like so: override def dbTableName = someschema.user ...for Mapper to issue the correct queries to the database. Thanks, Juan On Nov 19, 6:23 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Nov 17, 2009 at 10:50 AM, opyate opy...@gmail.com wrote: Hello Lifters, I overrode newSuperConnection like so: --START-- object DBVendor extends ConnectionManager { def newConnection(name: ConnectionIdentifier): Box[Connection] = { try { Class.forName(dbDriver) val dm = DriverManager.getConnection(dbConnString, dbUser, dbPass) Full(dm) } catch { case e = { e.printStackTrace Empty } } } def releaseConnection(conn: Connection) {conn.close} override def newSuperConnection(name: ConnectionIdentifier): Box[SuperConnection] = { val c: Connection = newConnection(name).open_! def release = () = releaseConnection(c) Full(new SuperConnection(c, release, Full(schema) )) } } --END-- ...where schema is defined beforehand. Now, I have to read/write to a Postgres table which is in a schema, e.g. schemaname.tablename When I run my Lift code, I get the following exception: Caught and thrown by: Message: org.postgresql.util.PSQLException: ERROR: relation tablename does not exist schemaName is used in Schemifier, but not in query construction. If this is a bug, please create a repro example (something we can use to test) and open a ticket. Thanks, David However, if I change the model from this: override def dbTableName = tablename to this: override def dbTableName = schemaname.tablename ...then things start working, but this is obviously not the intended way to achieve this, right? Please let me know what I'm doing wrong. Thanks, Juan -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to
RE: [Lift] Beef with LiftRules.explicitlyParsedSuffixes
By the way Microsoft uses some really long suffixes, e.g., MS Access Developer Extension Deployment Wizard files, and Pocket PC emulator. -Original Message- From: David Pollak feeder.of.the.be...@gmail.com Sent: Wednesday, November 25, 2009 10:34 AM To: liftweb@googlegroups.com Subject: Re: [Lift] Beef with LiftRules.explicitlyParsedSuffixes I'm not overly keen on the whitelist stuff. Someone's going to get cranky about it. I'm open to either adding a whole lot more to the white list or saying that everything n characters (e.g., 5) is a suffix unless it's on a blacklist -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: How to get the servlet context
Heiko, In the meantime, I found that solution as well... I tried it, and the default seems to be a work directory in target. I guess I can set another value for the attribute if I manage to convince jetty to do that for me. What I forgot to mention is that the directory is to contain images that are to be served by jetty... So it means the directory should be logically under webapp, but not in the war (of course). If I use a link from inside the war to some regular file system location, I'll probably run into the same problem as before. Any idea how to do this? Job H. On Nov 27, 6:56 pm, Heiko Seeberger heiko.seeber...@googlemail.com wrote: File tempdir = (File) config.getServletContext().getAttribute(javax.servlet.context.tempdir) 2009/11/27 jhonig al...@xs4all.nl Dear Heiko, According to the Servlet spec each webapp has got a private temporary directory. I cannot remember exactly how to get this, maybe ServletContext.getTmpDir(). Please take a look at the spec. I started reading the spec, but didn't find it yet. ServletContext doesn't have any obvious way to get to a temporary dir, but I assumed I could create one. Would probably need to tweak a security policy to be able to write to it, but that would be the next step. Job H. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Heiko Seeberger My job: weiglewilczek.com My blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala: scalamodules.org Lift, the simply functional web framework: liftweb.net -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: How to get the servlet context
Job, This directory is managed by the servlet container and as far as I know there is little you can do to configure the location. If you use Tomcat you are able to specify CATALINA_BASE and it will be somewhere beneath that directory, I believe it is work/Catalina/localhost/WABAPP-NAME. Regarding serving images from there: Depending on the configuration of the servlet container WARs are not unpacked, hence there is no standard way to bring these images into your webapp. I think you will not be able to have the servlet container serve these images directly. But it should be easy to write a ServletFilter or something that will do it for you. Heiko 2009/11/27 jhonig al...@xs4all.nl Heiko, In the meantime, I found that solution as well... I tried it, and the default seems to be a work directory in target. I guess I can set another value for the attribute if I manage to convince jetty to do that for me. What I forgot to mention is that the directory is to contain images that are to be served by jetty... So it means the directory should be logically under webapp, but not in the war (of course). If I use a link from inside the war to some regular file system location, I'll probably run into the same problem as before. Any idea how to do this? Job H. On Nov 27, 6:56 pm, Heiko Seeberger heiko.seeber...@googlemail.com wrote: File tempdir = (File) config.getServletContext().getAttribute(javax.servlet.context.tempdir) 2009/11/27 jhonig al...@xs4all.nl Dear Heiko, According to the Servlet spec each webapp has got a private temporary directory. I cannot remember exactly how to get this, maybe ServletContext.getTmpDir(). Please take a look at the spec. I started reading the spec, but didn't find it yet. ServletContext doesn't have any obvious way to get to a temporary dir, but I assumed I could create one. Would probably need to tweak a security policy to be able to write to it, but that would be the next step. Job H. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Heiko Seeberger My job: weiglewilczek.com My blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala: scalamodules.org Lift, the simply functional web framework: liftweb.net -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Heiko Seeberger My job: weiglewilczek.com My blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala: scalamodules.org Lift, the simply functional web framework: liftweb.net -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Beef with LiftRules.explicitlyParsedSuffixes
For a default behavior this is a reasonable approach. But from a framework perspective this is a little limiting. In order to be more extensible I think we should allow users to plug in their own splitting functions (say a LiftRules RulesSeq of functions) and essentially determine what is suffix and what is not based on potentially some more complex rules. But that's just me ... Br's, Marius On Nov 27, 10:04 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: By the way Microsoft uses some really long suffixes, e.g., MS Access Developer Extension Deployment Wizard files, and Pocket PC emulator. -Original Message- From: David Pollak feeder.of.the.be...@gmail.com Sent: Wednesday, November 25, 2009 10:34 AM To: liftweb@googlegroups.com Subject: Re: [Lift] Beef with LiftRules.explicitlyParsedSuffixes I'm not overly keen on the whitelist stuff. Someone's going to get cranky about it. I'm open to either adding a whole lot more to the white list or saying that everything n characters (e.g., 5) is a suffix unless it's on a blacklist -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Beef with LiftRules.explicitlyParsedSuffixes
Hmm, I like this approach marius - its more elegant than what we have now. What would be the overhead of such a system? It seems like this would better fit the lift configuration idioms also. Cheers, Tim On 27 Nov 2009, at 21:52, Marius wrote: For a default behavior this is a reasonable approach. But from a framework perspective this is a little limiting. In order to be more extensible I think we should allow users to plug in their own splitting functions (say a LiftRules RulesSeq of functions) and essentially determine what is suffix and what is not based on potentially some more complex rules. But that's just me ... Br's, Marius On Nov 27, 10:04 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: By the way Microsoft uses some really long suffixes, e.g., MS Access Developer Extension Deployment Wizard files, and Pocket PC emulator. -Original Message- From: David Pollak feeder.of.the.be...@gmail.com Sent: Wednesday, November 25, 2009 10:34 AM To: liftweb@googlegroups.com Subject: Re: [Lift] Beef with LiftRules.explicitlyParsedSuffixes I'm not overly keen on the whitelist stuff. Someone's going to get cranky about it. I'm open to either adding a whole lot more to the white list or saying that everything n characters (e.g., 5) is a suffix unless it's on a blacklist -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: How to get the servlet context
Here's a nugget of information for you that will help (as I do something similar to what you want in one of my applications): val protectionDomain: ProtectionDomain = classOf[bootstrap.liftweb.Boot].getProtectionDomain() val location: URL = protectionDomain.getCodeSource().getLocation() Print the value of location, and that will get you headed in the right direction ;-) Moreover, if your using jetty, if there is a work directory next to where the war file is, jetty will automatically expand the war into that work folder... if not, it makes a temp directory in the relevant OS temp directory (/var/tmp on *nix OS) Godspeed. Tim. On 27 Nov 2009, at 21:49, Heiko Seeberger wrote: Job, This directory is managed by the servlet container and as far as I know there is little you can do to configure the location. If you use Tomcat you are able to specify CATALINA_BASE and it will be somewhere beneath that directory, I believe it is work/Catalina/localhost/WABAPP-NAME. Regarding serving images from there: Depending on the configuration of the servlet container WARs are not unpacked, hence there is no standard way to bring these images into your webapp. I think you will not be able to have the servlet container serve these images directly. But it should be easy to write a ServletFilter or something that will do it for you. Heiko 2009/11/27 jhonig al...@xs4all.nl Heiko, In the meantime, I found that solution as well... I tried it, and the default seems to be a work directory in target. I guess I can set another value for the attribute if I manage to convince jetty to do that for me. What I forgot to mention is that the directory is to contain images that are to be served by jetty... So it means the directory should be logically under webapp, but not in the war (of course). If I use a link from inside the war to some regular file system location, I'll probably run into the same problem as before. Any idea how to do this? Job H. On Nov 27, 6:56 pm, Heiko Seeberger heiko.seeber...@googlemail.com wrote: File tempdir = (File) config.getServletContext().getAttribute(javax.servlet.context.tempdir) 2009/11/27 jhonig al...@xs4all.nl Dear Heiko, According to the Servlet spec each webapp has got a private temporary directory. I cannot remember exactly how to get this, maybe ServletContext.getTmpDir(). Please take a look at the spec. I started reading the spec, but didn't find it yet. ServletContext doesn't have any obvious way to get to a temporary dir, but I assumed I could create one. Would probably need to tweak a security policy to be able to write to it, but that would be the next step. Job H. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Heiko Seeberger My job: weiglewilczek.com My blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala: scalamodules.org Lift, the simply functional web framework: liftweb.net -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Heiko Seeberger My job: weiglewilczek.com My blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala: scalamodules.org Lift, the simply functional web framework: liftweb.net -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Impossible to use Mapper on GAE?
I cant think of a reason why mapper would not work on GAE? Mapper does not work with bigtable. You could write a record implementation if you really wanted to use bigtable. Cheers, Tim On Nov 27, 7:52 pm, jlist9 jli...@gmail.com wrote: Still seeking an answer. I notice that the lift GAE example has a database demo. Does it use Mapper and read from/write to bigtable?http://lift-example.appspot.com/database On Thu, Nov 26, 2009 at 12:51 PM, jlist9 jli...@gmail.com wrote: Hi, I read from the list that Mapper is not supported on Google App Engine (I see people use JPA instead.) I wonder if this is a matter of non-existent drivers, or there are some fundamental issues that make it impossible? Thanks, Jack -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Impossible to use Mapper on GAE?
Oh. I thought bigtable is the only datastore available on GAE? On Fri, Nov 27, 2009 at 3:55 PM, Timothy Perrett timo...@getintheloop.eu wrote: I cant think of a reason why mapper would not work on GAE? Mapper does not work with bigtable. You could write a record implementation if you really wanted to use bigtable. Cheers, Tim On Nov 27, 7:52 pm, jlist9 jli...@gmail.com wrote: Still seeking an answer. I notice that the lift GAE example has a database demo. Does it use Mapper and read from/write to bigtable?http://lift-example.appspot.com/database On Thu, Nov 26, 2009 at 12:51 PM, jlist9 jli...@gmail.com wrote: Hi, I read from the list that Mapper is not supported on Google App Engine (I see people use JPA instead.) I wonder if this is a matter of non-existent drivers, or there are some fundamental issues that make it impossible? Thanks, Jack -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Impossible to use Mapper on GAE?
I'm not sure about that, but I know for sure that mapper does not work with big table ;-) Cheers, Tim Sent from my iPhone On 28 Nov 2009, at 00:43, jlist9 jli...@gmail.com wrote: Oh. I thought bigtable is the only datastore available on GAE? On Fri, Nov 27, 2009 at 3:55 PM, Timothy Perrett timo...@getintheloop.eu wrote: I cant think of a reason why mapper would not work on GAE? Mapper does not work with bigtable. You could write a record implementation if you really wanted to use bigtable. Cheers, Tim On Nov 27, 7:52 pm, jlist9 jli...@gmail.com wrote: Still seeking an answer. I notice that the lift GAE example has a database demo. Does it use Mapper and read from/write to bigtable?http://lift-example.appspot.com/database On Thu, Nov 26, 2009 at 12:51 PM, jlist9 jli...@gmail.com wrote: Hi, I read from the list that Mapper is not supported on Google App Engine (I see people use JPA instead.) I wonder if this is a matter of non-existent drivers, or there are some fundamental issues that make it impossible? Thanks, Jack -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en . -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en . -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Impossible to use Mapper on GAE?
Hmmm. I wonder how the database demo in the lift GAE demo was implemented... is the source available somewhere? http://lift-example.appspot.com/database On Fri, Nov 27, 2009 at 5:00 PM, Timothy Perrett timo...@getintheloop.eu wrote: I'm not sure about that, but I know for sure that mapper does not work with big table ;-) Cheers, Tim Sent from my iPhone On 28 Nov 2009, at 00:43, jlist9 jli...@gmail.com wrote: Oh. I thought bigtable is the only datastore available on GAE? On Fri, Nov 27, 2009 at 3:55 PM, Timothy Perrett timo...@getintheloop.eu wrote: I cant think of a reason why mapper would not work on GAE? Mapper does not work with bigtable. You could write a record implementation if you really wanted to use bigtable. Cheers, Tim On Nov 27, 7:52 pm, jlist9 jli...@gmail.com wrote: Still seeking an answer. I notice that the lift GAE example has a database demo. Does it use Mapper and read from/write to bigtable?http://lift-example.appspot.com/database On Thu, Nov 26, 2009 at 12:51 PM, jlist9 jli...@gmail.com wrote: Hi, I read from the list that Mapper is not supported on Google App Engine (I see people use JPA instead.) I wonder if this is a matter of non-existent drivers, or there are some fundamental issues that make it impossible? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Oracle DB connection in 1.1-m7
http://reviewboard.liftweb.net/r/129/ I'll check this in to master in the morning. On Fri, Nov 27, 2009 at 8:53 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: I should have a fix in 30 minutes or so. On Thu, Nov 26, 2009 at 9:56 AM, Mathias Sulser s...@suls.org wrote: I think the MappedBoolean isn't properly done in the OracleDriver: scala User.findAll(By(User.superUser, false)) java.sql.SQLException: Invalid column type at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:146) at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:208) at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical (OraclePreparedStatement.java:9168) at ora... And if you look at the generated DDL: CREATE TABLE USERS ( ... SUPERUSER decimal(22), ... ); Any hints on how to solve this? Btw, it's a 10g data base On Nov 26, 4:14 pm, Mathias Sulser s...@suls.org wrote: All right. Figuring out the proper JDBC string was all. Schemifyer seems to then pick the right driver and produce DDL for the specific DB. Great stuff. On Nov 26, 3:17 pm, suls s...@suls.org wrote: Hi, I see that there is a DriverType and OracleDriver in 1.1-m7 but again I don't know how to connect the dots. How would a DB.defineConnectionManager method call that uses an oracle db look like? Thanks, suls -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Impossible to use Mapper on GAE?
Hi, On Sat, Nov 28, 2009 at 10:10 AM, jlist9 jli...@gmail.com wrote: Hmmm. I wonder how the database demo in the lift GAE demo was implemented... is the source available somewhere? http://lift-example.appspot.com/database It is running with H2 in-memory mode. Sincerely, -- Atsuhiko Yamanaka JCraft,Inc. 1-14-20 HONCHO AOBA-KU, SENDAI, MIYAGI 980-0014 Japan. Tel +81-22-723-2150 +1-415-578-3454 Skype callto://jcraft/ Twitter: @ymnk -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] fsc and Lift
Does anybody use fsc instead of scalac? I find scalac slow. Are there any known issues with using fsc with Lift? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Impossible to use Mapper on GAE?
I see. Thanks. That explains it. On Fri, Nov 27, 2009 at 8:34 PM, Atsuhiko Yamanaka atsuhiko.yaman...@gmail.com Hmmm. I wonder how the database demo in the lift GAE demo was implemented... is the source available somewhere? http://lift-example.appspot.com/database It is running with H2 in-memory mode. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Lift and LDAP
Did anyone try to integrate with SSO? On Sat, Nov 28, 2009 at 12:37 AM, Marcin Jurczuk mjurc...@gmail.com wrote: That is amazing :) Probably I will need to bind to AD in near future, so this module is like fallen from heavens :) On 27 Lis, 15:11, TylerWeir tyler.w...@gmail.com wrote: http://jgoday.wordpress.com/2009/11/27/lift-ldap/ One of the requisites to start using Lift at my work, was to use LDAP authentification. So i wrote a little module lift-ldap for that and a sample app, it was damn simple! http://github.com/jgoday/lift-ldaphttp://github.com/jgoday/sample_lift_ldap -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Scala中文社区: http://groups.google.com/group/scalacn -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] MetaMapper - Count with Group By?
Hi there, is it possible, to create a select statement like SELECT user_id, count(*) FROM table GROUP BY user_id with the MetaMapper? I want to let users get statistical information about some tables like how many news did that guy / the top 5 posters write or how many news are in each category. Thanks, Joern -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: fsc and Lift
If you're using Maven to manage your Lift project and especially testing things with the mvn jetty:run target, run mvn scala:cc in another shell. It will run fsc, detect source file changes and recompile them, reloading classes or restarting Jetty as necessary. It works very well, though I find that editing actor classes tends to require a true shutdown of Jetty and restart. Peter Robinett On Nov 27, 9:03 pm, jack jack.wid...@gmail.com wrote: Does anybody use fsc instead of scalac? I find scalac slow. Are there any known issues with using fsc with Lift? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Building war for production mode.
I have the same issue, is add this statement into /home/jetty6/bin/ jetty.sh ### echo JAVA_OPTIONS=-Drun.mode=production /home/jetty6/bin/ jetty.sh ### then restart the jetty server, but it alwasy show the Development Mode information The requested page was not defined in your SiteMap, so access was blocked The server is CentOS 5.3 Cheers, Neil On Nov 27, 7:13 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Marcin Jurczuk mjurc...@gmail.com writes: Hello, I'm trying to first test deploy of my app :) I created package (mvn package), uploaded created war as root.war in webapp folder of jetty server and when running app it looks that lift app is running in development mode (no 404 is showed but: The requested page was not defined in your SiteMap, so access was blocked. (This message is displayed in development mode only How inform maven that I'm building production package ? I tried mvn -Drun.mode=production package - no effect ? You don't build for deployment, it is the same war (modulus any compiler settings or other build steps you've specified) The lift run mode is determined at runtime, so you need to specify the run.mode=production as a system property when launching jetty (This is what happens with the maven command above: It starts jetty with this system property set) If you happen to run jetty on a Debian based Linux you can accomplish this by: echo JAVA_OPTIONS=-Drun.mode=production /etc/default/jetty6 /Jeppe -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.