Hi, I've you're running against an h2 database, you can add the following to the end of your Boot.boot to launch the h2 web console when every you start up jetty. It's a very simple web interface to the database, but super convenient (it will even launch your browser for you):
if (Props.devMode) { import org.h2.server.web.WebServer import _root_.org.h2.tools.Server import _root_.org.h2.util.StartBrowser val webServer = new WebServer() val server = new Server(webServer, "-webPort", "0") server.start DBVendor.newConnection(DefaultConnectionIdentifier).map(c=> { val url = webServer.addSession(c) Log.info("H2 WebConsole at:\n" + url) StartBrowser.openURL(url) }) } To start using h2, if you're not already: add this to the <dependencies> section of your pom.xml: <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>1.2.121</version> </dependency> And change this in Boot.scala: from: DB.defineConnectionManager(DefaultConnectionIdentifier, DBVendor) to: DB.defineConnectionManager(DefaultConnectionIdentifier, new StandardDBVendor(Props.get("db.driver") openOr "org.h2.Driver", Props.get("db.url") openOr "jdbc:h2:lift_proto.db", Props.get("db.user"), Props.get("db.password"))) On Dec 7, 2009, at 12:21 PM, David Pollak wrote: > > > On Mon, Dec 7, 2009 at 9:14 AM, itsjar <its...@gmail.com> wrote: > thanks again to the guys who put their efforts in answering questions > here. > I'll try a different approach this time. > > I would suggest building the "To Do" app as a first step: > http://liftweb.net/docs/getting_started/mod_master.html > > You'll get a lot of exposure to Lift in bite-sized chunks. Once you've gone > through the demo, then you can move on to other things, including building > your own authentication system. > > Why do I suggest this? (1) Learning Scala's syntax and some of Scala's > idioms gives you better grounding for understanding ProtoUser (2) seeing how > to build simple Mapper classes will give you a better understanding of the > more complex ones (3) walking before you run helps you to not fall down and > skin your knees. > > But we are here... the whole 1,500+ member Lift community. We take newbies > very seriously and want to help them because we know that they'll help other > newbies one day. > > Thanks, > > David > > > Let's hope I get somewhere since our decision whether we will use lift > or not will depends on this. > > On Dec 7, 4:23 am, Alex Boisvert <alex.boisv...@gmail.com> wrote: > > Part of the source for these objects is automatically created when you > > generate your lift app using the Maven archetype. For example, you'll find > > the source to the User class unde > > src/main/scala/com/liftworkshop/model/User.scala. > > > > For classes that are part of the framework, such as MegaProtoUser etc. > > you'll find the source on Github athttp://github.com/dpp/liftweb/and more > > specifically look at ProtoUser.scala > > underhttp://github.com/dpp/liftweb/tree/master/lift-persistence/lift-mappe.... > > Also be sure to select the branch of Lift that you are using in order to > > avoid confusion. > > > > Good luck and keep asking question ;) > > alex > > > > On Sun, Dec 6, 2009 at 3:54 PM, itsjar <its...@gmail.com> wrote: > > > Hi, > > > > > I'm considering building a web application with my software > > > engineering group in Lift. > > > However when I started with lift I was surprised that I received a > > > whole log in / sign up website by > > > just using the MegaProtoUser. > > > This was at first sight fun, but I started wondering (and I'm pretty > > > sure my professor will say the same): "Do I really know what I just > > > did?". > > > > > So I decided to try and rebuild the Log in / Sign up thing from > > > scratch by using my own plain objects. > > > Ive been working on that for 2 days and It's been soooo frustrating. > > > > > I've been reading the lift book... Tutorials.. but all of them start > > > with the MegaProtoUser. > > > In 1.5 days time I only managed to make an index (signup) page with a > > > username/password field and a button which then redirects to a new > > > page. > > > > > Let me tell you in advance, I am totally new to Web developing. > > > > > Problems I have right now: > > > - I have no idea if my code actually created a User in my database > > > and I have no idea how to check it... > > > - I have no idea how to "log in" a user. I saw code in the sample > > > programs that compare the current logged in user with other users by > > > using a select statement. However retrieving the current user is based > > > upon the MegaProtoUser. I wonder how this is done behind my back since > > > I have no idea how to keep a variable of a 'logged in user' which > > > stays active across all pages.. > > > > > Because of these problems I thought it might be useful to see the > > > source code of the classes.. > > > Is it possible to see the scala source code of these classes? > > > > > Thanks, > > > itsjar > > > > > -- > > > > > 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<liftweb%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. > > > > > > -- > 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. -- 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.