[Lift] Re: File Download
Any thoughts on this? Still trying to get it to work. Thanks On Mar 5, 2:56 pm, DavidV david.v.villa...@gmail.com wrote: I have recreated a number of StreamingResponse methods from both the Loop link above and the Lift book and I still can't seem to get the desired effect. I have been able to get a PlainTextResponse to work by using LiftRules.dispatch in the Boot, like so: LiftRules.dispatch.prepend { case Req((analysis :: inprocess :: Nil), _, _) = () = Full(PlainTextResponse(test)) } However, I am unable to get any sort of streaming response to work in the particular snippet which contains the data I would like to use. Here are some of the methods I've tried: def textResponse: Box[LiftResponse] = { println(TEXT RESPONSE) val ab = text would go here Full(PlainTextResponse(ab, (Content-Type - text/plain) :: Nil, 200 )) } def streamingResponseFile: Box[LiftResponse] = { println(STREAMING RESPONSE FILE) val file: File = new File( C:\\Source\\trunk\\eclipse\\testLift\\src\\main\\webapp\\images\ \ultra.png ) val length = file.length val fileInput = new java.io.FileInputStream(file) Full(StreamingResponse(fileInput, () = { fileInput.close }, length, (Content-Type - image/png) :: Nil, Nil, 200) ) } Do I have to make a LiftRules.dispatch function in the Boot in addition to the StreamingResponse in my snippet? I am trying to download plain text, but it is variable and dependent on some parameters and other variables in the particular Snippet class. Would I have to pass that data into the boot method in order to get the desired response? I would prefer to handle it entirely in the snippet itself. Finally, I'm not really sure how exactly to handle the Full(StreamingResponse) once I have created it in order to actually download the data and save it to the client computer. Although I assume the browser will handle this one I've formatted the Response correctly and actually have it working. Thanks again, David On Mar 4, 11:13 am, Marius marius.dan...@gmail.com wrote: If you want todownloadthrough Lift than yes you can use StreamingResponse, or simply any other LiftResponse (depending on your mime-type) and use LiftRules.dispatch mechanism. But you could also let the container to serve thefile. By default Lift is trying to serve .html, .xhtml, .htm, .xml etc.. You can write your own rules by setting LiftRules.liftRequest = { case req = true // Pattern match whatever you like and return a Boolean } If Lift cannot find a resource for some reason and you want the container (or subsequent filters) to handle that you can set LiftRules.passNotFoundToChain = true On 4 mar., 17:09, DavidV david.v.villa...@gmail.com wrote: I am also looking todownloadafilefrom the server that is hosting my Lift web app. There is a very useful fileUpload method in the SHtml class and I was wondering if there may be something similar for afiledownload? I was unable to find anything, and searching for Lift or Scala Liftdownload on Google returns nothing but pages to downloadthe libraries, plugins or source code. I suppose I could use the StreamingResponse, but I am already saving thefileI need to the server and it would be nice to be able todownloadit to any client computer with the typical Browse button, similar to the upload, Thanks, David On Feb 14, 3:58 pm, Gang wangga...@gmail.com wrote: Thanks Tim, that's exactly what I'm looking for! On Feb 14, 11:27 am, Timothy Perrett timo...@getintheloop.eu wrote: See: http://blog.getintheloop.eu/2009/3/19/understanding-lift-s-streamingr... Construct the CSV in memory and just then stuff it into a streaming response as a byte array. Cheers, Tim On 14 Feb 2010, at 16:18, Gang wrote: Hi, I have a question and it may not be a pure Lift one. But since I'm working on a Lift app and this group is the most responsive one I have seen, might just try it here. I need todownloaddata from database in CSV format. What is the best approach within Lift framework? Do I have to write the data on the server somewhere and then provide user with a link? I have tried to google scala, lift,filedownload..., but could not come up with what I'm looking for. Maybe I didn't use the right key words in search? Thanks in advance! Brs Gang -- 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.-Hidequotedtext- - Show quoted text
[Lift] Re: File Download
I have recreated a number of StreamingResponse methods from both the Loop link above and the Lift book and I still can't seem to get the desired effect. I have been able to get a PlainTextResponse to work by using LiftRules.dispatch in the Boot, like so: LiftRules.dispatch.prepend { case Req((analysis :: inprocess :: Nil), _, _) = () = Full(PlainTextResponse(test)) } However, I am unable to get any sort of streaming response to work in the particular snippet which contains the data I would like to use. Here are some of the methods I've tried: def textResponse: Box[LiftResponse] = { println(TEXT RESPONSE) val ab = text would go here Full(PlainTextResponse(ab, (Content-Type - text/plain) :: Nil, 200 )) } def streamingResponseFile: Box[LiftResponse] = { println(STREAMING RESPONSE FILE) val file: File = new File( C:\\Source\\trunk\\eclipse\\testLift\\src\\main\\webapp\\images\ \ultra.png ) val length = file.length val fileInput = new java.io.FileInputStream(file) Full(StreamingResponse(fileInput, () = { fileInput.close }, length, (Content-Type - image/png) :: Nil, Nil, 200) ) } Do I have to make a LiftRules.dispatch function in the Boot in addition to the StreamingResponse in my snippet? I am trying to download plain text, but it is variable and dependent on some parameters and other variables in the particular Snippet class. Would I have to pass that data into the boot method in order to get the desired response? I would prefer to handle it entirely in the snippet itself. Finally, I'm not really sure how exactly to handle the Full(StreamingResponse) once I have created it in order to actually download the data and save it to the client computer. Although I assume the browser will handle this one I've formatted the Response correctly and actually have it working. Thanks again, David On Mar 4, 11:13 am, Marius marius.dan...@gmail.com wrote: If you want todownloadthrough Lift than yes you can use StreamingResponse, or simply any other LiftResponse (depending on your mime-type) and use LiftRules.dispatch mechanism. But you could also let the container to serve thefile. By default Lift is trying to serve .html, .xhtml, .htm, .xml etc.. You can write your own rules by setting LiftRules.liftRequest = { case req = true // Pattern match whatever you like and return a Boolean } If Lift cannot find a resource for some reason and you want the container (or subsequent filters) to handle that you can set LiftRules.passNotFoundToChain = true On 4 mar., 17:09, DavidV david.v.villa...@gmail.com wrote: I am also looking todownloadafilefrom the server that is hosting my Lift web app. There is a very useful fileUpload method in the SHtml class and I was wondering if there may be something similar for afiledownload? I was unable to find anything, and searching for Lift or Scala Liftdownload on Google returns nothing but pages to downloadthe libraries, plugins or source code. I suppose I could use the StreamingResponse, but I am already saving thefileI need to the server and it would be nice to be able todownloadit to any client computer with the typical Browse button, similar to the upload, Thanks, David On Feb 14, 3:58 pm, Gang wangga...@gmail.com wrote: Thanks Tim, that's exactly what I'm looking for! On Feb 14, 11:27 am, Timothy Perrett timo...@getintheloop.eu wrote: See: http://blog.getintheloop.eu/2009/3/19/understanding-lift-s-streamingr... Construct the CSV in memory and just then stuff it into a streaming response as a byte array. Cheers, Tim On 14 Feb 2010, at 16:18, Gang wrote: Hi, I have a question and it may not be a pure Lift one. But since I'm working on a Lift app and this group is the most responsive one I have seen, might just try it here. I need todownloaddata from database in CSV format. What is the best approach within Lift framework? Do I have to write the data on the server somewhere and then provide user with a link? I have tried to google scala, lift,filedownload..., but could not come up with what I'm looking for. Maybe I didn't use the right key words in search? Thanks in advance! Brs Gang -- 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.-Hidequotedtext - - Show quoted text - -- 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
[Lift] Re: File Download
I am also looking to download a file from the server that is hosting my Lift web app. There is a very useful fileUpload method in the SHtml class and I was wondering if there may be something similar for a file download? I was unable to find anything, and searching for Lift or Scala Lift download on Google returns nothing but pages to download the libraries, plugins or source code. I suppose I could use the StreamingResponse, but I am already saving the file I need to the server and it would be nice to be able to download it to any client computer with the typical Browse button, similar to the upload, Thanks, David On Feb 14, 3:58 pm, Gang wangga...@gmail.com wrote: Thanks Tim, that's exactly what I'm looking for! On Feb 14, 11:27 am, Timothy Perrett timo...@getintheloop.eu wrote: See: http://blog.getintheloop.eu/2009/3/19/understanding-lift-s-streamingr... Construct the CSV in memory and just then stuff it into a streaming response as a byte array. Cheers, Tim On 14 Feb 2010, at 16:18, Gang wrote: Hi, I have a question and it may not be a pure Lift one. But since I'm working on a Lift app and this group is the most responsive one I have seen, might just try it here. I need todownloaddata from database in CSV format. What is the best approach within Lift framework? Do I have to write the data on the server somewhere and then provide user with a link? I have tried to google scala, lift,filedownload..., but could not come up with what I'm looking for. Maybe I didn't use the right key words in search? Thanks in advance! Brs Gang -- 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.-Hide quoted text - - Show quoted text - -- 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: problems with tomcat
Update: The tomcat incompatability with the external server was caused by a Java version mismatch. I was compiling my scala code with a newer version of the JDK. I had an older JDK installed on the external server and this was causing a problem with some of my class files (but not others, oddly). Anyway, I updated my JDK version on the linux server and now the website is working correctly. Thanks for all the help! On Nov 17, 7:42 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: If you call maven with the right parameter it will skip the tests. I think it's something like -Dmaven.tests.skip . - DavidVdavid.v.villa...@gmail.com wrote: More specifically, I am trying to follow the stack trace to lead me to some sort of URL so that I can see where and why this connection is trying to be made. I'm not sure why the AppTest needs to make a connection in the first place. Can I just skip the Test portion of the mvn package command? Or do I have hard code the proxy settings somewhere other than in my maven settings.xml file? I'm still struggling with this problem... On Nov 16, 10:54 am, DavidV david.v.villa...@gmail.com wrote: For the time being I have code that compiles correctly and I am leaving eclipse completely out of the picture. I am running Windows Vista 64bit. I have quit eclipse and tried to run a mvn clean install to rebuild my project, but I get the exact same error that I previously posted (ConnectException) regarding the AppTest failure when the install command executes the TESTS. Therefore, the build fails. ... --- T E S T S --- Running net.genomas.lift.test.AppTest Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.199 sec FA ILURE! Results : Tests in error: testXml(net.genomas.lift.test.AppTest) Tests run: 2, Failures: 0, Errors: 1, Skipped: 0 [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] There are test failures. ... If I run the project with mvn cleantomcat:run it works fine because it doesn't execute the TESTS step. I think that myproblemswith remotetomcatserver may stem from eclipse messing up the correct maven packaging of the .war file. I'm still trying to figure out what is causing this ConnectException whenever AppTest.scala is executed that is preventing me from performing a normal mvn package On Nov 13, 6:39 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Nov 13, 2009 at 9:15 AM, DavidV david.v.villa...@gmail.com wrote: When running Lift-1.0.2 and Scala-2.7.5 I am able to compile and run my code through maven. However, I am concerned about my inability to run the mvn clean package command successfully without first running the clean command in eclipse. Yeah... Eclipse is generally a problem. Are you running Windows or Linux/Mac? Can you quite Eclipses before doing a build. I am afraid that this extra eclipse step may be interfering with the proper creation of the .war file which may be contributing to the problem. When I try to execute mvn clean package without eclipse I get the following error appearing in my surefire-report: --- Test set: net.genomas.lift.test.AppTest --- Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.251 sec FAILURE! testXml(net.genomas.lift.test.AppTest) Time elapsed: 1.228 sec ERROR! java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java: 195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:525) at java.net.Socket.connect(Socket.java:475) at sun.net.NetworkClient.doConnect(NetworkClient.java:163) at sun.net.www.http.HttpClient.openServer(HttpClient.java:394) at sun.net.www.http.HttpClient.openServer(HttpClient.java:529) at sun.net.www.http.HttpClient.init(HttpClient.java:233) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:323) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient (HttpURLConnection.java:860
[Lift] stateful submit
I have searched a number of threads and have found similar posts but nothing the exactly answers this relatively simple question. I am using the Lift submit method (net.liftweb.http.Shtml.submit) to submit a form. Upon submission, I want to execute another method called getImgs(s: String), so I have set up my submit button as so: def chooseIndex: NodeSeq = { ... td{submit(Metabolic Reserve Index, () = getImgs(met))}/td ... } In my .html file for this page I call the snippet with form=post lift:PortalHome.chooseIndex form=post / The getImgs method has a variable that relies on a URL parameter that is lost when I click the submit button, so my S.param(id).get returns a None.get error. How can I retain the parameter through the submit process? Is it best to use a StatefulSnippet? Can I read in the parameter as an attribute? I feel like like there are a number of ways to accomplish this, but what is the best, or most lifty way? Thanks, David -- 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: stateful submit
Capturing the value depends on reading it from the URL as a parameter, so even if it's local, after I submit the form and the page reloads without the id parameter in the URL, I still get the None.get error because it is trying find a parameter that isn't there. I need some way to keep the parameter in the URL after the form is submitted... On Nov 24, 2:10 pm, Ross Mellgren dri...@gmail.com wrote: Try capturing it as a local variable? e.g. def chooseIndex(ns: NodeSeq): NodeSeq = { val myParam = S.param(id) def getImgs(s: String) = /* work with myParam here */ td../td } If you want getImgs to be outside, then you can pass it in, def getImgs(s: String, myParam: Option[String]) = ... def chooseIndex(ns: NodeSeq): NodeSeq = { val myParam = S.param(id) td{ submit(..., () = getImgs(met, myParam)) }/td } -Ross On Nov 24, 2009, at 2:02 PM, DavidV wrote: I have searched a number of threads and have found similar posts but nothing the exactly answers this relatively simple question. I am using the Lift submit method (net.liftweb.http.Shtml.submit) to submit a form. Upon submission, I want to execute another method called getImgs(s: String), so I have set up my submit button as so: def chooseIndex: NodeSeq = { ... td{submit(Metabolic Reserve Index, () = getImgs(met))}/td ... } In my .html file for this page I call the snippet with form=post lift:PortalHome.chooseIndex form=post / The getImgs method has a variable that relies on a URL parameter that is lost when I click the submit button, so my S.param(id).get returns a None.get error. How can I retain the parameter through the submit process? Is it best to use a StatefulSnippet? Can I read in the parameter as an attribute? I feel like like there are a number of ways to accomplish this, but what is the best, or most lifty way? Thanks, David -- 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.
[Lift] Re: problems with tomcat
More specifically, I am trying to follow the stack trace to lead me to some sort of URL so that I can see where and why this connection is trying to be made. I'm not sure why the AppTest needs to make a connection in the first place. Can I just skip the Test portion of the mvn package command? Or do I have hard code the proxy settings somewhere other than in my maven settings.xml file? I'm still struggling with this problem... On Nov 16, 10:54 am, DavidV david.v.villa...@gmail.com wrote: For the time being I have code that compiles correctly and I am leaving eclipse completely out of the picture. I am running Windows Vista 64bit. I have quit eclipse and tried to run a mvn clean install to rebuild my project, but I get the exact same error that I previously posted (ConnectException) regarding the AppTest failure when the install command executes the TESTS. Therefore, the build fails. ... --- T E S T S --- Running net.genomas.lift.test.AppTest Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.199 sec FA ILURE! Results : Tests in error: testXml(net.genomas.lift.test.AppTest) Tests run: 2, Failures: 0, Errors: 1, Skipped: 0 [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] There are test failures. ... If I run the project with mvn cleantomcat:run it works fine because it doesn't execute the TESTS step. I think that my problems with remotetomcatserver may stem from eclipse messing up the correct maven packaging of the .war file. I'm still trying to figure out what is causing this ConnectException whenever AppTest.scala is executed that is preventing me from performing a normal mvn package On Nov 13, 6:39 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Nov 13, 2009 at 9:15 AM, DavidV david.v.villa...@gmail.com wrote: When running Lift-1.0.2 and Scala-2.7.5 I am able to compile and run my code through maven. However, I am concerned about my inability to run the mvn clean package command successfully without first running the clean command in eclipse. Yeah... Eclipse is generally a problem. Are you running Windows or Linux/Mac? Can you quite Eclipses before doing a build. I am afraid that this extra eclipse step may be interfering with the proper creation of the .war file which may be contributing to the problem. When I try to execute mvn clean package without eclipse I get the following error appearing in my surefire-report: --- Test set: net.genomas.lift.test.AppTest --- Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.251 sec FAILURE! testXml(net.genomas.lift.test.AppTest) Time elapsed: 1.228 sec ERROR! java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java: 195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:525) at java.net.Socket.connect(Socket.java:475) at sun.net.NetworkClient.doConnect(NetworkClient.java:163) at sun.net.www.http.HttpClient.openServer(HttpClient.java:394) at sun.net.www.http.HttpClient.openServer(HttpClient.java:529) at sun.net.www.http.HttpClient.init(HttpClient.java:233) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:323) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient (HttpURLConnection.java:860) at sun.net.www.protocol.http.HttpURLConnection.plainConnect (HttpURLConnection.java:801) at sun.net.www.protocol.http.HttpURLConnection.connect (HttpURLConnection.java:726) at sun.net.www.protocol.http.HttpURLConnection.getInputStream (HttpURLConnection.java:1049) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity (XMLEntityManager.java:677) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity (XMLEntityManager.java:1315) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity (XMLEntityManager.java:1282) at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource (XMLDTDScannerImpl.java:283
[Lift] Re: problems with tomcat
I skipped the Test portion of mvn package by removing the testCompile goal from my pom file under the maven-scala-plugin. War packaging is now working correctly, but the webapp still isn't deploying on the remote Tomcat server...will keep at it and will post my solution if I find one... I think it still has to do with my database connection On Nov 17, 10:41 am, DavidV david.v.villa...@gmail.com wrote: More specifically, I am trying to follow the stack trace to lead me to some sort of URL so that I can see where and why this connection is trying to be made. I'm not sure why the AppTest needs to make a connection in the first place. Can I just skip the Test portion of the mvn package command? Or do I have hard code the proxy settings somewhere other than in my maven settings.xml file? I'm still struggling with this problem... On Nov 16, 10:54 am, DavidV david.v.villa...@gmail.com wrote: For the time being I have code that compiles correctly and I am leaving eclipse completely out of the picture. I am running Windows Vista 64bit. I have quit eclipse and tried to run a mvn clean install to rebuild my project, but I get the exact same error that I previously posted (ConnectException) regarding the AppTest failure when the install command executes the TESTS. Therefore, the build fails. ... --- T E S T S --- Running net.genomas.lift.test.AppTest Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.199 sec FA ILURE! Results : Tests in error: testXml(net.genomas.lift.test.AppTest) Tests run: 2, Failures: 0, Errors: 1, Skipped: 0 [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] There are test failures. ... If I run the project with mvn cleantomcat:run it works fine because it doesn't execute the TESTS step. I think that my problems with remotetomcatserver may stem from eclipse messing up the correct maven packaging of the .war file. I'm still trying to figure out what is causing this ConnectException whenever AppTest.scala is executed that is preventing me from performing a normal mvn package On Nov 13, 6:39 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Nov 13, 2009 at 9:15 AM, DavidV david.v.villa...@gmail.com wrote: When running Lift-1.0.2 and Scala-2.7.5 I am able to compile and run my code through maven. However, I am concerned about my inability to run the mvn clean package command successfully without first running the clean command in eclipse. Yeah... Eclipse is generally a problem. Are you running Windows or Linux/Mac? Can you quite Eclipses before doing a build. I am afraid that this extra eclipse step may be interfering with the proper creation of the .war file which may be contributing to the problem. When I try to execute mvn clean package without eclipse I get the following error appearing in my surefire-report: --- Test set: net.genomas.lift.test.AppTest --- Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.251 sec FAILURE! testXml(net.genomas.lift.test.AppTest) Time elapsed: 1.228 sec ERROR! java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java: 195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:525) at java.net.Socket.connect(Socket.java:475) at sun.net.NetworkClient.doConnect(NetworkClient.java:163) at sun.net.www.http.HttpClient.openServer(HttpClient.java:394) at sun.net.www.http.HttpClient.openServer(HttpClient.java:529) at sun.net.www.http.HttpClient.init(HttpClient.java:233) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:323) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient (HttpURLConnection.java:860) at sun.net.www.protocol.http.HttpURLConnection.plainConnect (HttpURLConnection.java:801) at sun.net.www.protocol.http.HttpURLConnection.connect (HttpURLConnection.java:726) at sun.net.www.protocol.http.HttpURLConnection.getInputStream (HttpURLConnection.java:1049
[Lift] Re: problems with tomcat
For the time being I have code that compiles correctly and I am leaving eclipse completely out of the picture. I am running Windows Vista 64bit. I have quit eclipse and tried to run a mvn clean install to rebuild my project, but I get the exact same error that I previously posted (ConnectException) regarding the AppTest failure when the install command executes the TESTS. Therefore, the build fails. ... --- T E S T S --- Running net.genomas.lift.test.AppTest Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.199 sec FA ILURE! Results : Tests in error: testXml(net.genomas.lift.test.AppTest) Tests run: 2, Failures: 0, Errors: 1, Skipped: 0 [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] There are test failures. ... If I run the project with mvn clean tomcat:run it works fine because it doesn't execute the TESTS step. I think that my problems with remote tomcat server may stem from eclipse messing up the correct maven packaging of the .war file. I'm still trying to figure out what is causing this ConnectException whenever AppTest.scala is executed that is preventing me from performing a normal mvn package On Nov 13, 6:39 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Nov 13, 2009 at 9:15 AM, DavidV david.v.villa...@gmail.com wrote: When running Lift-1.0.2 and Scala-2.7.5 I am able to compile and run my code through maven. However, I am concerned about my inability to run the mvn clean package command successfully without first running the clean command in eclipse. Yeah... Eclipse is generally a problem. Are you running Windows or Linux/Mac? Can you quite Eclipses before doing a build. I am afraid that this extra eclipse step may be interfering with the proper creation of the .war file which may be contributing to the problem. When I try to execute mvn clean package without eclipse I get the following error appearing in my surefire-report: --- Test set: net.genomas.lift.test.AppTest --- Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.251 sec FAILURE! testXml(net.genomas.lift.test.AppTest) Time elapsed: 1.228 sec ERROR! java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java: 195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:525) at java.net.Socket.connect(Socket.java:475) at sun.net.NetworkClient.doConnect(NetworkClient.java:163) at sun.net.www.http.HttpClient.openServer(HttpClient.java:394) at sun.net.www.http.HttpClient.openServer(HttpClient.java:529) at sun.net.www.http.HttpClient.init(HttpClient.java:233) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:323) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient (HttpURLConnection.java:860) at sun.net.www.protocol.http.HttpURLConnection.plainConnect (HttpURLConnection.java:801) at sun.net.www.protocol.http.HttpURLConnection.connect (HttpURLConnection.java:726) at sun.net.www.protocol.http.HttpURLConnection.getInputStream (HttpURLConnection.java:1049) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity (XMLEntityManager.java:677) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity (XMLEntityManager.java:1315) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity (XMLEntityManager.java:1282) at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource (XMLDTDScannerImpl.java:283) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl $DTDDriver.dispatch(XMLDocumentScannerImpl.java:1193) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl $DTDDriver.next(XMLDocumentScannerImpl.java:1090) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl $PrologDriver.next(XMLDocumentScannerImpl.java:1003) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next (XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument
[Lift] Re: problems with tomcat
$class.foreach(Iterable.scala:256) at scala.runtime.BoxedArray.foreach(BoxedArray.scala:24) at net.genomas.lift.test.AppTest.wellFormed$1(AppTest.scala:48) at net.genomas.lift.test.AppTest.testXml(AppTest.scala:65) I am working behind a firewall that is important for the security of our data where I work, so it cannot be disabled. I also work behind a proxy but I have configured the maven settings.xml file to get past the proxy, and that definitely works because I am able to download .jar files, etc from the internet when I update to newer versions of scala/lift. I would like to be able to run mvn clean package successfully without using eclipse at all to ensure that I am getting a correctly configured .war file. This may be the reason that I am having trouble deploying to Tomcat. Any ideas regarding how to fix this connection failure? Thanks, David On Nov 12, 4:59 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Scala is very, very, super ultra mega version fragile. This means that code compiled with 2.7.5 will not work with code compiled with 2.7.7 and vice versa. So, in your pom.xml file, please set your scala version to 2.7.5 (nothing else... not 2.7.4, not 2.7.7) and lift to 1.0.2 Then mvn clean tomcat:run -- does it work? Then mvn clean install -- does the WAR file work in Tomcat? On Thu, Nov 12, 2009 at 1:10 PM, DavidV david.v.villa...@gmail.com wrote: Another potentially helpful detail is that I get the same liftFilter error when running on a local jetty server through maven as I do when running on tomcat (also through maven). I am executing a clean command before running the web app each and every time. ... 2009-11-12 16:10:05.833::WARN: failed LiftFilter: java.lang.AbstractMethodError 2009-11-12 16:10:05.834::WARN: failed org.mortbay.jetty.plugin.Jetty6PluginWebA ppcont...@14c0275{/,C:\Source\trunk\eclipse\testLift\src\main\webapp}: java.lang .AbstractMethodError ... On Nov 12, 3:40 pm, DavidV david.v.villa...@gmail.com wrote: I just tried to run the same code that used to work with Lift-1.0.1 and Scala 2.7.5 with my updates to Lift 1.0.1 and Scala 2.7.7 and I got the following error: [INFO] [tomcat:run {execution: default-cli}] [INFO] Running war onhttp://localhost:8080/portal [INFO] Creating Tomcat server configuration at c:\Source\trunk\eclipse \testLift\ target\tomcat Nov 12, 2009 3:36:51 PM org.apache.catalina.startup.Embedded start INFO: Starting tomcat server Nov 12, 2009 3:36:51 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.16 Nov 12, 2009 3:36:53 PM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filterLiftFilter java.lang.AbstractMethodError at scala.actors.Scheduler$.impl(Scheduler.scala:35) at scala.actors.Scheduler$.execute(Scheduler.scala:101) at scala.actors.Actor$class.start(Actor.scala:783) at net.liftweb.http.PointlessActorToWorkAroundBug$.start (LiftServlet.sca la:702) at net.liftweb.http.PointlessActorToWorkAroundBug$.ctor (LiftServlet.scal a:767) at net.liftweb.http.PointlessActorToWorkAroundBug$.init (LiftServlet.sc ala:776) at net.liftweb.http.PointlessActorToWorkAroundBug$.clinit (LiftServlet. scala) at net.liftweb.http.LiftFilter.init(LiftServlet.scala:563) at org.apache.catalina.core.ApplicationFilterConfig.getFilter (Applicatio nFilterConfig.java:275) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica tionFilterConfig.java:397) at org.apache.catalina.core.ApplicationFilterConfig.init (ApplicationFi lterConfig.java:108) at org.apache.catalina.core.StandardContext.filterStart (StandardContext. java:3709) at org.apache.catalina.core.StandardContext.start (StandardContext.java:4 356) at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start (StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start (StandardEngine.java:443 ) at org.apache.catalina.startup.Embedded.start(Embedded.java: 825) at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer (AbstractRunMo jo.java:385) at org.codehaus.mojo.tomcat.AbstractRunMojo.execute (AbstractRunMojo.java :144) at org.apache.maven.plugin.DefaultPluginManager.executeMojo (DefaultPlugi nManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal
[Lift] problems with tomcat
I am having some issues deploying my Lift web application to a tomcat server. When I run tomcat through maven (mvn tomcat:run), the web application works properly and connects to my postgres database. However, when I use mvn package to create a war file which I then deploy to a local tomcat server (on my computer) only the HTML of the web application appears and the snippets with the application's content fail. It appears to be a problem with the sitemap loading properly, because I changed the sitemap by deleting one of many Loc.If parameters and the web application then worked as expected. However, when I then tried to deploy the same .war file to a tomcat server on a different computer, the web app failed again, showing only the HTML and not the snippets. I suspect that perhaps this is because I need to change my url to the postgres database, but I've tried many permutations of the url and none seem to work. To make things worse, the logging doesn't seem to be working properly making it difficult to diagnose the exact problem. I can't locate a stdout.log file anywhere. In my catalina.out file I get the following error: java.lang.NullPointerException at scala.runtime.BoxesRunTime.boxToInteger(Unknown Source) at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply (Actor.scala:800) at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply (Actor.scala:794) at scala.actors.Reaction.run(Reaction.scala:82) at net.liftweb.http.ActorSchedulerFixer$$anon$1$$anon$3.run (LiftServlet.scala:673) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask (ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) I also get an error that says: log4j:WARN Please initialize the log4j system properly. Do I need to configure log4j in order to get the stdout.log file? Any ideas of what might be going on here? Thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: problems with tomcat
I don't appear to have any conflicting jars in my TOMCAT_HOME/common/ lib folder, however, I am now realizing that I have a postgres jdbc3 .jar file in there and I am using a jdbc4 .jar postres file in my webapp. Perhaps that is the problem? I'll check that out. I am using Lift 1.0.1 with Scala version 2.7.5 It does work with the tomcat on my computer, which leads me to believe that it should be compatible with the current versions of Lift/Scala that I'm using. Maybe that's an incorrect assumption though, as I'm not very familiar with tomcat. On Nov 12, 2:15 pm, David Pollak feeder.of.the.be...@gmail.com wrote: What version of Lift are you using? If it's Lift 1.1-M7 or 1.1-SNAPSHOT, please make sure you've got the Scala version set to 2.7.7 If you're using Eclipse for development, please make sure to do a mvn *clean * package to build your WAR file. The clean phase is super important. On Thu, Nov 12, 2009 at 11:07 AM, DavidV david.v.villa...@gmail.com wrote: I am having some issues deploying my Lift web application to a tomcat server. When I run tomcat through maven (mvn tomcat:run), the web application works properly and connects to my postgres database. However, when I use mvn package to create a war file which I then deploy to a local tomcat server (on my computer) only the HTML of the web application appears and the snippets with the application's content fail. It appears to be a problem with the sitemap loading properly, because I changed the sitemap by deleting one of many Loc.If parameters and the web application then worked as expected. However, when I then tried to deploy the same .war file to a tomcat server on a different computer, the web app failed again, showing only the HTML and not the snippets. I suspect that perhaps this is because I need to change my url to the postgres database, but I've tried many permutations of the url and none seem to work. To make things worse, the logging doesn't seem to be working properly making it difficult to diagnose the exact problem. I can't locate a stdout.log file anywhere. In my catalina.out file I get the following error: java.lang.NullPointerException at scala.runtime.BoxesRunTime.boxToInteger(Unknown Source) at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply (Actor.scala:800) at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply (Actor.scala:794) at scala.actors.Reaction.run(Reaction.scala:82) at net.liftweb.http.ActorSchedulerFixer$$anon$1$$anon$3.run (LiftServlet.scala:673) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask (ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) I also get an error that says: log4j:WARN Please initialize the log4j system properly. Do I need to configure log4j in order to get the stdout.log file? Any ideas of what might be going on here? Thanks, David -- 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 liftweb@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: problems with tomcat
On a side note, while I'm installing Lift 1.0.2 with Scala2.7.5, I always execute a clean command before the mvn package. However, I also need to execute a clean in eclipse before the mvn package works properly. Otherwise, I get this error: --- T E S T S --- Running net.genomas.lift.test.AppTest Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.258 sec FA ILURE! Results : Tests in error: testXml(net.genomas.lift.test.AppTest) Tests run: 2, Failures: 0, Errors: 1, Skipped: 0 [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] There are test failures. Please refer to c:\Source\trunk\eclipse\testLift\target\surefire- reports for the individual test results. [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 32 seconds [INFO] Finished at: Thu Nov 12 15:21:06 EST 2009 [INFO] Final Memory: 29M/53M [INFO] I now have Lift-1.0.2 and Scala 2.7.7 and am testing with tomcat. On Nov 12, 2:43 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Nov 12, 2009 at 11:36 AM, DavidV david.v.villa...@gmail.com wrote: I don't appear to have any conflicting jars in my TOMCAT_HOME/common/ lib folder, however, I am now realizing that I have a postgres jdbc3 .jar file in there and I am using a jdbc4 .jar postres file in my webapp. Perhaps that is the problem? I'll check that out. I am using Lift 1.0.1 with Scala version 2.7.5 Please use Lift 1.0.2 Please delete ~/.m2 (or whereever your Maven repository is) Please do a mvn clean install Then test locally (mvn tomcat:run) If it works, copy to your other Tomcat instance and see how things work. It does work with the tomcat on my computer, which leads me to believe that it should be compatible with the current versions of Lift/Scala that I'm using. Maybe that's an incorrect assumption though, as I'm not very familiar with tomcat. On Nov 12, 2:15 pm, David Pollak feeder.of.the.be...@gmail.com wrote: What version of Lift are you using? If it's Lift 1.1-M7 or 1.1-SNAPSHOT, please make sure you've got the Scala version set to 2.7.7 If you're using Eclipse for development, please make sure to do a mvn *clean * package to build your WAR file. The clean phase is super important. On Thu, Nov 12, 2009 at 11:07 AM, DavidV david.v.villa...@gmail.com wrote: I am having some issues deploying my Lift web application to a tomcat server. When I run tomcat through maven (mvn tomcat:run), the web application works properly and connects to my postgres database. However, when I use mvn package to create a war file which I then deploy to a local tomcat server (on my computer) only the HTML of the web application appears and the snippets with the application's content fail. It appears to be a problem with the sitemap loading properly, because I changed the sitemap by deleting one of many Loc.If parameters and the web application then worked as expected. However, when I then tried to deploy the same .war file to a tomcat server on a different computer, the web app failed again, showing only the HTML and not the snippets. I suspect that perhaps this is because I need to change my url to the postgres database, but I've tried many permutations of the url and none seem to work. To make things worse, the logging doesn't seem to be working properly making it difficult to diagnose the exact problem. I can't locate a stdout.log file anywhere. In my catalina.out file I get the following error: java.lang.NullPointerException at scala.runtime.BoxesRunTime.boxToInteger(Unknown Source) at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply (Actor.scala:800) at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply (Actor.scala:794) at scala.actors.Reaction.run(Reaction.scala:82) at net.liftweb.http.ActorSchedulerFixer$$anon$1$$anon$3.run (LiftServlet.scala:673) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask (ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) I also get an error that says: log4j:WARN Please initialize the log4j system properly. Do I need to configure log4j in order to get the stdout.log file? Any ideas of what might be going on here? Thanks, David
[Lift] Re: problems with tomcat
I just tried to run the same code that used to work with Lift-1.0.1 and Scala 2.7.5 with my updates to Lift 1.0.1 and Scala 2.7.7 and I got the following error: [INFO] [tomcat:run {execution: default-cli}] [INFO] Running war on http://localhost:8080/portal [INFO] Creating Tomcat server configuration at c:\Source\trunk\eclipse \testLift\ target\tomcat Nov 12, 2009 3:36:51 PM org.apache.catalina.startup.Embedded start INFO: Starting tomcat server Nov 12, 2009 3:36:51 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.16 Nov 12, 2009 3:36:53 PM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter LiftFilter java.lang.AbstractMethodError at scala.actors.Scheduler$.impl(Scheduler.scala:35) at scala.actors.Scheduler$.execute(Scheduler.scala:101) at scala.actors.Actor$class.start(Actor.scala:783) at net.liftweb.http.PointlessActorToWorkAroundBug$.start (LiftServlet.sca la:702) at net.liftweb.http.PointlessActorToWorkAroundBug$.ctor (LiftServlet.scal a:767) at net.liftweb.http.PointlessActorToWorkAroundBug$.init (LiftServlet.sc ala:776) at net.liftweb.http.PointlessActorToWorkAroundBug$.clinit (LiftServlet. scala) at net.liftweb.http.LiftFilter.init(LiftServlet.scala:563) at org.apache.catalina.core.ApplicationFilterConfig.getFilter (Applicatio nFilterConfig.java:275) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica tionFilterConfig.java:397) at org.apache.catalina.core.ApplicationFilterConfig.init (ApplicationFi lterConfig.java:108) at org.apache.catalina.core.StandardContext.filterStart (StandardContext. java:3709) at org.apache.catalina.core.StandardContext.start (StandardContext.java:4 356) at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start (StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start (StandardEngine.java:443 ) at org.apache.catalina.startup.Embedded.start(Embedded.java: 825) at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer (AbstractRunMo jo.java:385) at org.codehaus.mojo.tomcat.AbstractRunMojo.execute (AbstractRunMojo.java :144) at org.apache.maven.plugin.DefaultPluginManager.executeMojo (DefaultPlugi nManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (DefaultLi fecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java: 328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java: 138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main (CompatibleMain.java:6 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced (Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode (Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Nov 12, 2009 3:36:53 PM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Nov 12, 2009 3:36:53 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/portal] startup failed due to previous errors Nov 12, 2009 3:36:53 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Nov 12, 2009 3:36:54 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 This seems more consistent with whatever is happening on the external tomcat server... Thoughts? Also, any ideas about the test failures during the mvn clean package command? Thanks, I finally feel like I'm getting somewhere now! -David On Nov 12, 3:21 pm, DavidV david.v.villa...@gmail.com wrote: On a side note, while I'm installing Lift 1.0.2 with Scala2.7.5, I always execute a clean command
[Lift] Re: problems with tomcat
Another potentially helpful detail is that I get the same liftFilter error when running on a local jetty server through maven as I do when running on tomcat (also through maven). I am executing a clean command before running the web app each and every time. ... 2009-11-12 16:10:05.833::WARN: failed LiftFilter: java.lang.AbstractMethodError 2009-11-12 16:10:05.834::WARN: failed org.mortbay.jetty.plugin.Jetty6PluginWebA ppcont...@14c0275{/,C:\Source\trunk\eclipse\testLift\src\main\webapp}: java.lang .AbstractMethodError ... On Nov 12, 3:40 pm, DavidV david.v.villa...@gmail.com wrote: I just tried to run the same code that used to work with Lift-1.0.1 and Scala 2.7.5 with my updates to Lift 1.0.1 and Scala 2.7.7 and I got the following error: [INFO] [tomcat:run {execution: default-cli}] [INFO] Running war onhttp://localhost:8080/portal [INFO] Creating Tomcat server configuration at c:\Source\trunk\eclipse \testLift\ target\tomcat Nov 12, 2009 3:36:51 PM org.apache.catalina.startup.Embedded start INFO: Starting tomcat server Nov 12, 2009 3:36:51 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.16 Nov 12, 2009 3:36:53 PM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filterLiftFilter java.lang.AbstractMethodError at scala.actors.Scheduler$.impl(Scheduler.scala:35) at scala.actors.Scheduler$.execute(Scheduler.scala:101) at scala.actors.Actor$class.start(Actor.scala:783) at net.liftweb.http.PointlessActorToWorkAroundBug$.start (LiftServlet.sca la:702) at net.liftweb.http.PointlessActorToWorkAroundBug$.ctor (LiftServlet.scal a:767) at net.liftweb.http.PointlessActorToWorkAroundBug$.init (LiftServlet.sc ala:776) at net.liftweb.http.PointlessActorToWorkAroundBug$.clinit (LiftServlet. scala) at net.liftweb.http.LiftFilter.init(LiftServlet.scala:563) at org.apache.catalina.core.ApplicationFilterConfig.getFilter (Applicatio nFilterConfig.java:275) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica tionFilterConfig.java:397) at org.apache.catalina.core.ApplicationFilterConfig.init (ApplicationFi lterConfig.java:108) at org.apache.catalina.core.StandardContext.filterStart (StandardContext. java:3709) at org.apache.catalina.core.StandardContext.start (StandardContext.java:4 356) at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start (StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start (StandardEngine.java:443 ) at org.apache.catalina.startup.Embedded.start(Embedded.java: 825) at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer (AbstractRunMo jo.java:385) at org.codehaus.mojo.tomcat.AbstractRunMojo.execute (AbstractRunMojo.java :144) at org.apache.maven.plugin.DefaultPluginManager.executeMojo (DefaultPlugi nManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (DefaultLi fecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java: 328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java: 138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main (CompatibleMain.java:6 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced (Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode (Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Nov 12, 2009 3:36:53 PM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Nov 12, 2009 3:36:53 PM
[Lift] Mapping MappedDouble to Postgres database
I am trying to map a MappedDouble object to a postgres database and I get the following error: Exception in thread main org.postgresql.util.PSQLException: ERROR: type double does not exist I am looking through the Schemifier to try and figure out where the database type is assigned and how to override it. Postgres has a real type which would be appropriate for the DB columns I am creating. Can anyone help me in converting the MappedDouble to create a DB column of type real in postgres? Thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: Mapping MappedDouble to Postgres database
I found an old post that addresses this problem. I am still using Lift-1.0, so I'll update and that should fix the problem. -David On Sep 1, 5:11 pm, DavidV david.v.villa...@gmail.com wrote: I am trying to map a MappedDouble object to a postgres database and I get the following error: Exception in thread main org.postgresql.util.PSQLException: ERROR: type double does not exist I am looking through the Schemifier to try and figure out where the database type is assigned and how to override it. Postgres has a real type which would be appropriate for the DB columns I am creating. Can anyone help me in converting the MappedDouble to create a DB column of type real in postgres? Thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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] syntax question
This may be more of an HTML question, but since I haven't found an answer online, I'm working in Lift and I'm sure most people here can answer this easily I figured I'd ask. I am trying to create a dynamic HTML table, by looping through the rows and columns of the table and inserting variables from a two- dimensional array. my array is calls and is an Array[Array[Result]] The basic structure of the table that I want to create is: def resultTable: NodeSeq = { table border=1 for (r - 0 until analysis.slots.length) { tr for (c - 0 until test.testvars.length) { new CellType(calls(r)(c).output) } /tr } /table } I have a class CellType that returns a td variable content /td The resultTable method is in a snippet class and I am calling it from a separate HTML file. All other mechanisms are working well since I tested a simple trtdTEST/td/tr within the same method and it created the table as expected. Therefore, this is simply a syntax error. I know you have to use {} to isolate scala code/variables in HTML, but I'm not sure how to do that when the brackets are necessary for the loop. Thanks for the help, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: syntax question
Like this? def resultTable: NodeSeq = { table border=1 {for (r - 0 until analysis.slots.length) { tr {for (c - 0 until test.testvars.length) { new CellType(calls(r)(c).output) }} /tr }} /table } that is not working for me either, it still returns an empty table... can you by any chance demonstrate by editing this table? table tr for (c - 0 until 10) { td {array(c)} /td } /tr /table thanks, David On Aug 28, 3:49 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: You can nest curly braces - just surround the for loop with another pair. - DavidVdavid.v.villa...@gmail.com wrote: This may be more of an HTML question, but since I haven't found an answer online, I'm working in Lift and I'm sure most people here can answer this easily I figured I'd ask. I am trying to create a dynamic HTML table, by looping through the rows and columns of the table and inserting variables from a two- dimensional array. my array is calls and is an Array[Array[Result]] The basic structure of the table that I want to create is: def resultTable: NodeSeq = { table border=1 for (r - 0 until analysis.slots.length) { tr for (c - 0 until test.testvars.length) { new CellType(calls(r)(c).output) } /tr } /table } I have a class CellType that returns a td variable content /td The resultTable method is in a snippet class and I am calling it from a separate HTML file. All other mechanisms are working well since I tested a simple trtdTEST/td/tr within the same method and it created the table as expected. Therefore, this is simply a syntax error. I know you have to use {} to isolate scala code/variables in HTML, but I'm not sure how to do that when the brackets are necessary for the loop. Thanks for the help, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: syntax question
Sorry for the confusion. The way I initially represented the table, it did not compile. I got the following errors: in XML literal: '' expected instead of '0' in XML literal: '' expected instead of '0' in XML literal: expected closing tag of - in XML literal: expected closing tag of - on lines: 3, 5, 8 and 10, respectively. 1 def resultTable: NodeSeq = { 2 table border=1 3 for (r - 0 until analysis.slots.length) { 4 tr 5 for (c - 0 until test.testvars.length) { 6 new CellType(calls(r)(c).output) 7 } 8 /tr 9 } 10 /table 11 } I have tried a number of different ways to add the curly braces that makes it compile, including they way you suggested. However every time I succeed in making it compile with curly braces it returns an empty table. On Aug 28, 3:49 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: You can nest curly braces - just surround the for loop with another pair. - DavidVdavid.v.villa...@gmail.com wrote: This may be more of an HTML question, but since I haven't found an answer online, I'm working in Lift and I'm sure most people here can answer this easily I figured I'd ask. I am trying to create a dynamic HTML table, by looping through the rows and columns of the table and inserting variables from a two- dimensional array. my array is calls and is an Array[Array[Result]] The basic structure of the table that I want to create is: def resultTable: NodeSeq = { table border=1 for (r - 0 until analysis.slots.length) { tr for (c - 0 until test.testvars.length) { new CellType(calls(r)(c).output) } /tr } /table } I have a class CellType that returns a td variable content /td The resultTable method is in a snippet class and I am calling it from a separate HTML file. All other mechanisms are working well since I tested a simple trtdTEST/td/tr within the same method and it created the table as expected. Therefore, this is simply a syntax error. I know you have to use {} to isolate scala code/variables in HTML, but I'm not sure how to do that when the brackets are necessary for the loop. Thanks for the help, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: syntax question
and yes, I verified that it has the necessary information to iterate by substituting the td values with a println On Aug 28, 4:15 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: Before it was empty or not compiling? Can you verify that it has what to iterate? - DavidVdavid.v.villa...@gmail.com wrote: Like this? def resultTable: NodeSeq = { table border=1 {for (r - 0 until analysis.slots.length) { tr {for (c - 0 until test.testvars.length) { new CellType(calls(r)(c).output) }} /tr }} /table } that is not working for me either, it still returns an empty table... can you by any chance demonstrate by editing this table? table tr for (c - 0 until 10) { td {array(c)} /td } /tr /table thanks, David On Aug 28, 3:49 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: You can nest curly braces - just surround the for loop with another pair. - DavidVdavid.v.villa...@gmail.com wrote: This may be more of an HTML question, but since I haven't found an answer online, I'm working in Lift and I'm sure most people here can answer this easily I figured I'd ask. I am trying to create a dynamic HTML table, by looping through the rows and columns of the table and inserting variables from a two- dimensional array. my array is calls and is an Array[Array[Result]] The basic structure of the table that I want to create is: def resultTable: NodeSeq = { table border=1 for (r - 0 until analysis.slots.length) { tr for (c - 0 until test.testvars.length) { new CellType(calls(r)(c).output) } /tr } /table } I have a class CellType that returns a td variable content /td The resultTable method is in a snippet class and I am calling it from a separate HTML file. All other mechanisms are working well since I tested a simple trtdTEST/td/tr within the same method and it created the table as expected. Therefore, this is simply a syntax error. I know you have to use {} to isolate scala code/variables in HTML, but I'm not sure how to do that when the brackets are necessary for the loop. Thanks for the help, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: syntax question
Aha! I knew it was something simple. Thanks! On Aug 28, 4:57 pm, Viktor Klang viktor.kl...@gmail.com wrote: table { for(i - 0 until 10) yield tr { for(j - 0 until 10) yield td{j}/td } /tr } /table My guess is that you've omitted your yields On Fri, Aug 28, 2009 at 10:34 PM, DavidV david.v.villa...@gmail.com wrote: and yes, I verified that it has the necessary information to iterate by substituting the td values with a println On Aug 28, 4:15 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: Before it was empty or not compiling? Can you verify that it has what to iterate? - DavidVdavid.v.villa...@gmail.com wrote: Like this? def resultTable: NodeSeq = { table border=1 {for (r - 0 until analysis.slots.length) { tr {for (c - 0 until test.testvars.length) { new CellType(calls(r)(c).output) }} /tr }} /table } that is not working for me either, it still returns an empty table... can you by any chance demonstrate by editing this table? table tr for (c - 0 until 10) { td {array(c)} /td } /tr /table thanks, David On Aug 28, 3:49 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: You can nest curly braces - just surround the for loop with another pair. - DavidVdavid.v.villa...@gmail.com wrote: This may be more of an HTML question, but since I haven't found an answer online, I'm working in Lift and I'm sure most people here can answer this easily I figured I'd ask. I am trying to create a dynamic HTML table, by looping through the rows and columns of the table and inserting variables from a two- dimensional array. my array is calls and is an Array[Array[Result]] The basic structure of the table that I want to create is: def resultTable: NodeSeq = { table border=1 for (r - 0 until analysis.slots.length) { tr for (c - 0 until test.testvars.length) { new CellType(calls(r)(c).output) } /tr } /table } I have a class CellType that returns a td variable content /td The resultTable method is in a snippet class and I am calling it from a separate HTML file. All other mechanisms are working well since I tested a simple trtdTEST/td/tr within the same method and it created the table as expected. Therefore, this is simply a syntax error. I know you have to use {} to isolate scala code/variables in HTML, but I'm not sure how to do that when the brackets are necessary for the loop. Thanks for the help, David -- Viktor Klang Blog: klangism.blogspot.com Twttr: viktorklang Lift Committer - liftweb.com AKKA Committer - akkasource.org Cassidy - github.com/viktorklang/Cassidy.git SoftPub founder:http://groups.google.com/group/softpub --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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 request param
For the laboratory website I am building I need to keep track of batches of samples as they are being processed, and would like to do so with a request parameter in the URL. Right now, I am manually adding this parameter to every link: object batch extends MappedLong(this) { override def displayName = Batch override def asHtml: Node = a href={/analysis/ipbatchsamples? batch=+batch.is}Batch {is}/a } There must be a way with lift to pass this batch information along without having to store it on the server, but being new to lift I haven't been able to find it. Can someone point me in the right direction? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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] simple syntax question
I would like to include a variable value in an input tag in my .html file. I have defined a tag as follows: def upload(xhtml: Group): NodeSeq = if (S.get_?) { bind(ul, chooseTemplate(choose, get, xhtml), file_upload - fileUpload(ul = theUpload(Full (ul))), batch - currBatch ) } thus, choose:get ul:batch/ /choose:get returns the variable value that I need How can I retrieve this variable for the value= attribute of my input tag? For instance, right now I am trying to do it like this: input name=batch type=hidden value=ul:batch/ / but that is not working. It also doesn't work like this: input name=batch type=hidden value=ul:batch/ / Thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: simple syntax question
For now I have fixed the problem by calling a new method in my snippet that accesses the variable with { } in the input tag. I would be interested to know if there is a way to do this with a bind tag directly in the input tag in the .html file, because I feel like my current solution is a bit of a kludge... -David On Jun 17, 12:00 pm, DavidV david.v.villa...@gmail.com wrote: I would like to include a variable value in an input tag in my .html file. I have defined a tag as follows: def upload(xhtml: Group): NodeSeq = if (S.get_?) { bind(ul, chooseTemplate(choose, get, xhtml), file_upload - fileUpload(ul = theUpload(Full (ul))), batch - currBatch ) } thus, choose:get ul:batch/ /choose:get returns the variable value that I need How can I retrieve this variable for the value= attribute of my input tag? For instance, right now I am trying to do it like this: input name=batch type=hidden value=ul:batch/ / but that is not working. It also doesn't work like this: input name=batch type=hidden value=ul:batch/ / Thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: file upload
I'm still stuck on this problem. Just bringing it to the top of the list again so it's not forgotten... On Jun 15, 4:04 pm, DavidV david.v.villa...@gmail.com wrote: I was able to find the code and have a program ready to parse the files as soon as I can upload them. I tried writing my own version of the code found here:http://github.com/dpp/liftweb/blob/dcc7b064a42832b06e4523d1a35351967d... but I got the following error when I tried to load the page on my browser: XML Parsing Error: prefix not bound to a namespace Location:http://localhost:8080/analysis/inprocess Line Number 78, Column 1: choose:post ^ I am not sure what choose is or where to find it and am having trouble finding documentation online. I am still working with Lift-1.0, could this be the problem? Thanks, David On Jun 12, 6:35 am, wapgui torsten.schm...@wapgui.com wrote: I do similar things. First there is a snippet using the bind functionality. var image : FileParamHolder = _ bind(widget, xhtml, image - fileUpload(image = _) } Now write out: val wbos : ByteArrayOutputStream = build(image) val fout = new File(outputFilename) if (fout.exists()) { Log.error(Tried to overwrite existing file) return Error: Filename already exists} val foStream = new FileOutputStream(fout) foStream.write(wbos.toByteArray()) foStream.close() def build(image : FileParamHolder) : ByteArrayOutputStream = { val bout = new ByteArrayOutputStream() val zipout : ZipOutputStream = new ZipOutputStream(bout) zipout.setMethod(ZipOutputStream.DEFLATED); zipout.setLevel(Deflater.DEFAULT_COMPRESSION); writeImage(zos, image) } private def writeImage(zos: ZipOutputStream, image:FileParamHolder):Unit = { if (image.fileName == ) { Log.info(Provided image file is null) return } if (image.fileName.lastIndexOf(\\) != -1) //this is needed if upload is from a windows system zos.putNextEntry(new ZipEntry(res/ + image.fileName.substring (image.fileName.lastIndexOf(\\)+1))) else zos.putNextEntry(new ZipEntry(res/ + image.fileName)) zos.write(image.file, 0, image.file.length) //make here a loop on very large files zos.closeEntry() } Cheers Torsten On Jun 11, 10:24 pm, DavidV david.v.villa...@gmail.com wrote: I would like to upload a .csv file onto the web server so I can then parse it in my webapp, and put certain fields into my database. I would like a Browse... button, much like the one shown on this Lift example page:http://demo.liftweb.net/file_upload Can anyone point me in the right direction as to how to get started doing this, or tell me where I can find the example code for the link I provided? I can't seem to locate it in liftweb in github thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: file upload
yes, that's what I was looking for. thanks! On Jun 16, 11:11 am, TylerWeir tyler.w...@gmail.com wrote: Take a look at:http://github.com/dpp/liftweb/blob/dcc7b064a42832b06e4523d1a35351967d... It should cast some light on your issue. On Jun 16, 9:54 am, DavidV david.v.villa...@gmail.com wrote: I'm still stuck on this problem. Just bringing it to the top of the list again so it's not forgotten... On Jun 15, 4:04 pm, DavidV david.v.villa...@gmail.com wrote: I was able to find the code and have a program ready to parse the files as soon as I can upload them. I tried writing my own version of the code found here:http://github.com/dpp/liftweb/blob/dcc7b064a42832b06e4523d1a35351967d... but I got the following error when I tried to load the page on my browser: XML Parsing Error: prefix not bound to a namespace Location:http://localhost:8080/analysis/inprocess Line Number 78, Column 1: choose:post ^ I am not sure what choose is or where to find it and am having trouble finding documentation online. I am still working with Lift-1.0, could this be the problem? Thanks, David On Jun 12, 6:35 am, wapgui torsten.schm...@wapgui.com wrote: I do similar things. First there is a snippet using the bind functionality. var image : FileParamHolder = _ bind(widget, xhtml, image - fileUpload(image = _) } Now write out: val wbos : ByteArrayOutputStream = build(image) val fout = new File(outputFilename) if (fout.exists()) { Log.error(Tried to overwrite existing file) return Error: Filename already exists} val foStream = new FileOutputStream(fout) foStream.write(wbos.toByteArray()) foStream.close() def build(image : FileParamHolder) : ByteArrayOutputStream = { val bout = new ByteArrayOutputStream() val zipout : ZipOutputStream = new ZipOutputStream(bout) zipout.setMethod(ZipOutputStream.DEFLATED); zipout.setLevel(Deflater.DEFAULT_COMPRESSION); writeImage(zos, image) } private def writeImage(zos: ZipOutputStream, image:FileParamHolder):Unit = { if (image.fileName == ) { Log.info(Provided image file is null) return } if (image.fileName.lastIndexOf(\\) != -1) //this is needed if upload is from a windows system zos.putNextEntry(new ZipEntry(res/ + image.fileName.substring (image.fileName.lastIndexOf(\\)+1))) else zos.putNextEntry(new ZipEntry(res/ + image.fileName)) zos.write(image.file, 0, image.file.length) //make here a loop on very large files zos.closeEntry() } Cheers Torsten On Jun 11, 10:24 pm, DavidV david.v.villa...@gmail.com wrote: I would like to upload a .csv file onto the web server so I can then parse it in my webapp, and put certain fields into my database. I would like a Browse... button, much like the one shown on this Lift example page:http://demo.liftweb.net/file_upload Can anyone point me in the right direction as to how to get started doing this, or tell me where I can find the example code for the link I provided? I can't seem to locate it in liftweb in github thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: file upload
I was able to find the code and have a program ready to parse the files as soon as I can upload them. I tried writing my own version of the code found here: http://github.com/dpp/liftweb/blob/dcc7b064a42832b06e4523d1a35351967d7a46b2/sites/example/src/main/webapp/file_upload.html but I got the following error when I tried to load the page on my browser: XML Parsing Error: prefix not bound to a namespace Location: http://localhost:8080/analysis/inprocess Line Number 78, Column 1: choose:post ^ I am not sure what choose is or where to find it and am having trouble finding documentation online. I am still working with Lift-1.0, could this be the problem? Thanks, David On Jun 12, 6:35 am, wapgui torsten.schm...@wapgui.com wrote: I do similar things. First there is a snippet using the bind functionality. var image : FileParamHolder = _ bind(widget, xhtml, image - fileUpload(image = _) } Now write out: val wbos : ByteArrayOutputStream = build(image) val fout = new File(outputFilename) if (fout.exists()) { Log.error(Tried to overwrite existing file) return Error: Filename already exists} val foStream = new FileOutputStream(fout) foStream.write(wbos.toByteArray()) foStream.close() def build(image : FileParamHolder) : ByteArrayOutputStream = { val bout = new ByteArrayOutputStream() val zipout : ZipOutputStream = new ZipOutputStream(bout) zipout.setMethod(ZipOutputStream.DEFLATED); zipout.setLevel(Deflater.DEFAULT_COMPRESSION); writeImage(zos, image) } private def writeImage(zos: ZipOutputStream, image:FileParamHolder):Unit = { if (image.fileName == ) { Log.info(Provided image file is null) return } if (image.fileName.lastIndexOf(\\) != -1) //this is needed if upload is from a windows system zos.putNextEntry(new ZipEntry(res/ + image.fileName.substring (image.fileName.lastIndexOf(\\)+1))) else zos.putNextEntry(new ZipEntry(res/ + image.fileName)) zos.write(image.file, 0, image.file.length) //make here a loop on very large files zos.closeEntry() } Cheers Torsten On Jun 11, 10:24 pm, DavidV david.v.villa...@gmail.com wrote: I would like to upload a .csv file onto the web server so I can then parse it in my webapp, and put certain fields into my database. I would like a Browse... button, much like the one shown on this Lift example page:http://demo.liftweb.net/file_upload Can anyone point me in the right direction as to how to get started doing this, or tell me where I can find the example code for the link I provided? I can't seem to locate it in liftweb in github thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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] file upload
I would like to upload a .csv file onto the web server so I can then parse it in my webapp, and put certain fields into my database. I would like a Browse... button, much like the one shown on this Lift example page: http://demo.liftweb.net/file_upload Can anyone point me in the right direction as to how to get started doing this, or tell me where I can find the example code for the link I provided? I can't seem to locate it in liftweb in github thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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] NULLable MappedForeignKey
What is the proper way to create a MappedForeignKey that is optional? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: Menu widget
I added the dependency to my pom.xml exactly as you suggested and I'm getting this error: Downloading: http://scala-tools.org/repo-releases/net/liftweb/lift-widgets/1.1-S NAPSHOT/lift-widgets-1.1-SNAPSHOT.jar [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) net.liftweb:lift-widgets:jar:1.1-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=net.liftweb -DartifactId=lift- widgets - Dversion=1.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=net.liftweb -DartifactId=lift- widgets -Dv ersion=1.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] - Drepositor yId=[id] Path to dependency: 1) testLift:testLift:war:1.0 2) net.liftweb:lift-widgets:jar:1.1-SNAPSHOT -- 1 required artifact is missing. for artifact: testLift:testLift:war:1.0 from the specified remote repositories: scala-tools.org (http://scala-tools.org/repo-releases), central (http://repo1.maven.org/maven2) I changed the dependency version to 1.0 because I followed the scala- tools.org link (http://scala-tools.org/repo-releases) and noticed that there wasn't a 1.1-SNAPSHOT version in net\liftweb\lift-widgets. Maven then compiled the project, but my menu still isn't showing up as I would like it to. I haven't changed my template. On Apr 2, 11:07 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Do you have lift-widgets module as a dependency in your pom.xml? dependency groupIdnet.liftweb/groupId artifactIdlift-widgets/artifactId version1.1-SNAPSHOT/version /dependency That's needed to get the dropdown widget code. Derek On Thu, Apr 2, 2009 at 3:13 PM, DavidV david.v.villa...@gmail.com wrote: I posted this yesterday but I haven't seen it appear yet...sorry if it is here twice. I downloaded the scripts separately because I didn't know how to update my repository/library to include the MenuWidget class and the appropriate .js and .css files. I tried running mvn install on my webapp, but it didn't download those new files. I fixed the problem with my .css file so it compiles now, however I'm still not getting the nice stylish superfish navbar. Instead, I'm getting a vertical bulleted list of links to my different pages. I think it's a problem with my template. Here are the relevant sections: html xmlns=http://www.w3.org/1999/xhtml; xmlns:lift=http:// liftweb.net/ head meta http-equiv=content-type content=text/html; charset=UTF-8 / meta name=description content= / meta name=keywords content= / titleMy WebApp lift:Menu.title / /title lift:StyleSheet.entryForm / lift:StyleSheet.fancyType / script id=jquery src=/classpath/jquery.js type=text/ javascript/ script id=json src=/classpath/json.js type=text/javascript/ /head body div class=container div style=text-align: center br/ h1 class=alt Welcome to My WebApp /h1 /div hr/ div lift:MyMenu.render / div lift:Msgs/ hr class=space / /div /div MyMenu is the snippet that contains the render method, which looks like this: def render(xhtml: NodeSeq): NodeSeq = { MenuWidget(MenuStyle.NAVBAR) } Does anyone see what might be wrong here? Thanks, David On Apr 1, 11:04 am, marius d. marius.dan...@gmail.com wrote: Is there a reason why you downloaded he scripts separately? ... the superfish dependencies are offered by the widget. Please see the lift- widgets project and the test applicaiton from there. Br's, Marius On Mar 31, 11:48 pm, DavidV david.v.villa...@gmail.com wrote: I would like to use this newMenuWidget, so I got the source code from GitHub and put it into my application as a snippet. I also downloaded all of the necessary superfish .css and .js files from the superfish website and put those in local sub-directories of the src/main/ webapp folder. When I try to compile the code in maven, however, I get the following error. C:\Source\trunk\eclipse\testLiftmvn clean jetty:run [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'jetty'. [INFO] [INFO] Building testLift [INFO] task-segment: [clean, jetty:run] [INFO] [INFO] [clean:clean] [INFO] Deleting directory C:\Source\trunk\eclipse\testLift\target
[Lift] Re: The Lift 1.1 list
Also, it would be great it Lift1.1 included all of the necessary .js, .css and class files for the new MenuWidget On Apr 3, 3:42 am, Charles F. Munat c...@munat.com wrote: Have you looked at Windmill? http://www.getwindmill.com/ From what I've heard it's pretty cool. Chas. David Pollak wrote: On Thu, Apr 2, 2009 at 10:09 AM, Bill Venners b...@artima.com mailto:b...@artima.com wrote: Hi David, On Thu, Apr 2, 2009 at 9:28 PM, David Pollak feeder.of.the.be...@gmail.com mailto:feeder.of.the.be...@gmail.com wrote: On Thu, Apr 2, 2009 at 2:30 AM, Bill Venners b...@artima.com mailto:b...@artima.com wrote: Hi David, On Thu, Apr 2, 2009 at 12:11 AM, David Pollak feeder.of.the.be...@gmail.com mailto:feeder.of.the.be...@gmail.com wrote: Folks, Improved testing framework and better testing support when running in test mode. Can you elaborate on what your plans are for this? It's a goal, not a set of plans. I'm expecting one of the committers would take ownership and figure it out. Wanna be a committer, take ownership, and figure it out? Ooh, I stepped in that one. Yeah... don't you know the rule... get a good idea and you own it. I'm just the Tom Sawyer who's convincing the smart folks to white-wash my fence/build Lift. ;-) The testing Lift apps is a good, real use case for both ScalaTest and Specs. I hope to meet with Eric Torreborre Monday. I'll talk with him about what's needed for Lift, as I think he's more familiar with its testing needs. I have definitely wanted to do some work with Lift so I can become more familiar with it as a web app framework, but just haven't had time yet. I'm gradually popping things off my stack of tasks, so I'll get there eventually. Cool. I think there's a need for a better way to test web apps in general and to describe the state models so that they can be tested in a sane way. I just don't have a clue as to how to do it. But... I think it ties in with the JavaScript enhancements I want to see in 1.1. Perhaps there's some sort of state/logic combinator thingy that can emit client-side JS, sync data, and be very testable. Dunno... just ranting/flailing. Bill Thanks. Bill -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: Menu widget
I posted this yesterday but I haven't seen it appear yet...sorry if it is here twice. I downloaded the scripts separately because I didn't know how to update my repository/library to include the MenuWidget class and the appropriate .js and .css files. I tried running mvn install on my webapp, but it didn't download those new files. I fixed the problem with my .css file so it compiles now, however I'm still not getting the nice stylish superfish navbar. Instead, I'm getting a vertical bulleted list of links to my different pages. I think it's a problem with my template. Here are the relevant sections: html xmlns=http://www.w3.org/1999/xhtml; xmlns:lift=http:// liftweb.net/ head meta http-equiv=content-type content=text/html; charset=UTF-8 / meta name=description content= / meta name=keywords content= / titleMy WebApp lift:Menu.title / /title lift:StyleSheet.entryForm / lift:StyleSheet.fancyType / script id=jquery src=/classpath/jquery.js type=text/ javascript/ script id=json src=/classpath/json.js type=text/javascript/ /head body div class=container div style=text-align: center br/ h1 class=alt Welcome to My WebApp /h1 /div hr/ div lift:MyMenu.render / div lift:Msgs/ hr class=space / /div /div MyMenu is the snippet that contains the render method, which looks like this: def render(xhtml: NodeSeq): NodeSeq = { MenuWidget(MenuStyle.NAVBAR) } Does anyone see what might be wrong here? Thanks, David On Apr 1, 11:04 am, marius d. marius.dan...@gmail.com wrote: Is there a reason why you downloaded he scripts separately? ... the superfish dependencies are offered by the widget. Please see the lift- widgets project and the test applicaiton from there. Br's, Marius On Mar 31, 11:48 pm, DavidV david.v.villa...@gmail.com wrote: I would like to use this newMenuWidget, so I got the source code from GitHub and put it into my application as a snippet. I also downloaded all of the necessary superfish .css and .js files from the superfish website and put those in local sub-directories of the src/main/ webapp folder. When I try to compile the code in maven, however, I get the following error. C:\Source\trunk\eclipse\testLiftmvn clean jetty:run [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'jetty'. [INFO] [INFO] Building testLift [INFO] task-segment: [clean, jetty:run] [INFO] [INFO] [clean:clean] [INFO] Deleting directory C:\Source\trunk\eclipse\testLift\target [INFO] Preparing jetty:run [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [yuicompressor:compress {execution: default}] [INFO] jquery.hoverIntent.js (4637b) - jquery.hoverIntent.js (0b)[0%] [INFO] superfish.js (3837b) - superfish.js (0b)[0%] [INFO] entryform.css (11417b) - entryform.css (10202b)[89%] [INFO] print.css (1341b) - print.css (821b)[61%] [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Illegal group reference [INFO] [INFO] Trace java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Matcher.java:713) at com.yahoo.platform.yui.compressor.CssCompressor.compress (CssCompresso r.java:78) at net.sf.alchim.mojo.yuicompressor.YuiCompressorMojo.processFile(YuiCom pressorMojo.java:182) at net.sf.alchim.mojo.yuicompressor.MojoSupport.processDir (MojoSupport.j ava:151) at net.sf.alchim.mojo.yuicompressor.MojoSupport.execute (MojoSupport.java :105) at org.apache.maven.plugin.DefaultPluginManager.executeMojo (DefaultPlugi nManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:558) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:499) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecy cle(DefaultLifecycleExecutor.java:924) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Def aultLifecycleExecutor.java:767) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:529) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:512
[Lift] SessionVar or RequestVar example
Does anyone know where I could find some example code of SessionVar or RequestVar in use? I am writing an application and I need to use a SessionVar or a RequestVar so that I can maintain and update the value of a variable throughout a session, but since I'm new to Lift I'm not sure how to use these types. Thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: Menu widget
I would like to use this new MenuWidget, so I got the source code from GitHub and put it into my application as a snippet. I also downloaded all of the necessary superfish .css and .js files from the superfish website and put those in local sub-directories of the src/main/ webapp folder. When I try to compile the code in maven, however, I get the following error. C:\Source\trunk\eclipse\testLiftmvn clean jetty:run [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'jetty'. [INFO] [INFO] Building testLift [INFO]task-segment: [clean, jetty:run] [INFO] [INFO] [clean:clean] [INFO] Deleting directory C:\Source\trunk\eclipse\testLift\target [INFO] Preparing jetty:run [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [yuicompressor:compress {execution: default}] [INFO] jquery.hoverIntent.js (4637b) - jquery.hoverIntent.js (0b)[0%] [INFO] superfish.js (3837b) - superfish.js (0b)[0%] [INFO] entryform.css (11417b) - entryform.css (10202b)[89%] [INFO] print.css (1341b) - print.css (821b)[61%] [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Illegal group reference [INFO] [INFO] Trace java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Matcher.java:713) at com.yahoo.platform.yui.compressor.CssCompressor.compress (CssCompresso r.java:78) at net.sf.alchim.mojo.yuicompressor.YuiCompressorMojo.processFile(YuiCom pressorMojo.java:182) at net.sf.alchim.mojo.yuicompressor.MojoSupport.processDir (MojoSupport.j ava:151) at net.sf.alchim.mojo.yuicompressor.MojoSupport.execute (MojoSupport.java :105) at org.apache.maven.plugin.DefaultPluginManager.executeMojo (DefaultPlugi nManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:558) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:499) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecy cle(DefaultLifecycleExecutor.java:924) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Def aultLifecycleExecutor.java:767) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:529) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:512) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:482) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:330) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:291) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (DefaultLi fecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java: 336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java: 129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced (Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode (Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [INFO] [INFO] Total time: 5 seconds [INFO] Finished at: Tue Mar 31 17:38:35 EDT 2009 [INFO] Final Memory: 17M/30M [INFO] Any ideas on how to prevent/fix this? Do I need to modify my .pom? Thanks, David On Mar 23, 12:18 pm, marius d. marius.dan...@gmail.com wrote: Cool ... if you tested it and theMenuWidget, from my perspective it is good to go into master. And it's really great that you added the ScalaDocs !!! Br's, Marius On Mar 23, 6:07 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: OK, I've pushed the new code on the wip-dcb-dropdown branch. I made some minor mods to the builtin Menu snippet (and changes to the Menu widget to match): 1. Added an expandAll attribute
[Lift] Re: SessionVar or RequestVar example
I figured out what I needed by checking out the counting link on the Lift demo page. However, I'd like to see some more examples of Session or RequestVar in use, so if anyone has some I'd still appreciate it. On Mar 31, 12:44 pm, DavidV david.v.villa...@gmail.com wrote: Does anyone know where I could find some example code of SessionVar or RequestVar in use? I am writing an application and I need to use a SessionVar or a RequestVar so that I can maintain and update the value of a variable throughout a session, but since I'm new to Lift I'm not sure how to use these types. Thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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] horizontal navbar drop-downs
I'm wondering if there is a built-in way to create drop-down menus from a horizontal navbar using the Menu.builder method. These are the relevant sections of my current template: titleMy Titlelift:Menu.title / /title lift:StyleSheet.entryForm / lift:StyleSheet.fancyType / script id=jquery src=/classpath/jquery.js type=text/ javascript/ script id=json src=/classpath/json.js type=text/javascript/ style /* ![CDATA[ */ #navbar ul { margin: 0; padding: 2px; list-style-type: none; font-weight: bold; text-align: center; background-color: #C3D9FF; } #navbar ul li { display: inline; } #navbar ul li a { text-decoration: none; padding: .2em 1em; color: #000; } #navbar ul li a:hover { color: #fff; background-color: #000; } /* ]] */ /style /head body div class=container div style=text-align: center br/ h1 class=alt Welcome to the Genomas DNA Banking Database /h1 /div hr/ div id=navbar ul lift:Menu.builder / /ul /div div class=column span-24 last lift:bind name=content / /div I have a couple links on my navbar that have sub-menu links. I have constructed them in my Boot.scala file like this: List(Menu(Loc(SampleLogging, List(samples, samplelogs), Browse Sample Logging), Menu(Loc(Individuals, List(individual, individual), Patient Demographics)), Menu(Loc(Requisition, List(requisition, requisition), Requisitions)), Menu(Loc(Samples2, List(samples, samples), Samples ::: List(Menu(Loc(EditSamp, List(samples, edit), Edit, Hidden))) ::: ...and so on. I would like to use some built-in tools to be able to make these sub- menu items drop downs from the parent menu item without having to build an entirely new complex table-based template. Does anyone know of a way to accomplish this? Thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: horizontal navbar drop-downs
That would definitely be very useful! The more widgets the better! In the meantime, I'll use the navbar that I have right now, which is perfectly functional but not aesthetically what I'm going for. Thanks again for the help. -David On Mar 19, 12:04 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Added a ticket for the enhancement: http://liftweb.lighthouseapp.com/projects/26102/tickets/24-create-lif... Derek On Thu, Mar 19, 2009 at 11:59 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: Cool! If Dan can share some code that would help, but in any case I don't think this is going to be a huge chunk of code. Derek On Thu, Mar 19, 2009 at 11:52 AM, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Mar 19, 2009 at 9:50 AM, marius d. marius.dan...@gmail.comwrote: I'm wondering if we shouldn't provide this by the means of a Lift widget. Looks like a needed feature ... WDYT ? Sounds good to me. Br's, Marius On Mar 19, 6:43 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Mar 19, 2009 at 9:30 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: This is something that has been asked before, but I don't think there was anything out there. I think that this would be a really nice feature, particularly if it could leverage the existing jQuery stuff. IIRC, the built-in Menu snippet doesn't render children at all unless the parent is the current selected page, so we would have to either modify that or we could code up a new MenuBar snippet that renders a bar instead of a UL like the current one. There's a way to ask for the entire menu rather than just the current view. Dan O'Leary from Enthiosys did this for Innovation Games Online. I've pinged him to see if he can share some of the code. Derek On Thu, Mar 19, 2009 at 10:21 AM, DavidV david.v.villa...@gmail.com wrote: I'm wondering if there is a built-in way to create drop-down menus from a horizontal navbar using the Menu.builder method. These are the relevant sections of my current template: titleMy Titlelift:Menu.title / /title lift:StyleSheet.entryForm / lift:StyleSheet.fancyType / script id=jquery src=/classpath/jquery.js type=text/ javascript/ script id=json src=/classpath/json.js type=text/javascript/ style /* ![CDATA[ */ #navbar ul { margin: 0; padding: 2px; list-style-type: none; font-weight: bold; text-align: center; background-color: #C3D9FF; } #navbar ul li { display: inline; } #navbar ul li a { text-decoration: none; padding: .2em 1em; color: #000; } #navbar ul li a:hover { color: #fff; background-color: #000; } /* ]] */ /style /head body div class=container div style=text-align: center br/ h1 class=alt Welcome to the Genomas DNA Banking Database /h1 /div hr/ div id=navbar ul lift:Menu.builder / /ul /div div class=column span-24 last lift:bind name=content / /div I have a couple links on my navbar that have sub-menu links. I have constructed them in my Boot.scala file like this: List(Menu(Loc(SampleLogging, List(samples, samplelogs), Browse Sample Logging), Menu(Loc(Individuals, List(individual, individual), Patient Demographics)), Menu(Loc(Requisition, List(requisition, requisition), Requisitions)), Menu(Loc(Samples2, List(samples, samples), Samples ::: List(Menu(Loc(EditSamp, List(samples, edit), Edit, Hidden))) ::: ...and so on. I would like to use some built-in tools to be able to make these sub- menu items drop downs from the parent menu item without having to build an entirely new complex table-based template. Does anyone know of a way to accomplish this? Thanks, David -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: MappedTextarea problem
I'm working on making my own style sheet now, thanks for the help. One more question: What if I have multiple text areas on one page but what them to be of different sizes? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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] MappedTextarea problem
For some reason when I override the textareaRows and textareaCols methods in MappedTextarea, the size of the text block appears the same in my web application no matter what size I assign to the rows and cols. Does anyone know how to decrease the size of the blank text area that shows up on the webpage? Thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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] populate DB table upon creation
I wondering how to populate rows of a DB table upon it's creation. First, where in the lift code are tables created? Is it in trait BaseMapper's dbAddTable method? I have an Array[String] I would like to add to the table when it is being created. Which method can I override to achieve this and how should I do so? Thanks! -David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: populate DB table upon creation
Those are both helpful pointers. I'm working out the details right now, I'll post my code as soon as I get it all worked out so that others can use it. Thanks again, David On Feb 20, 2:41 pm, David Pollak feeder.of.the.be...@gmail.com wrote: In your meta mapper, if you override dbAddTable to return Full[() = Unit], that function will be called after all the modifications have been made to the tables, if your table was added as part of Schemifier's changes. On Fri, Feb 20, 2009 at 9:18 AM, DavidV david.v.villa...@gmail.com wrote: I wondering how to populate rows of a DB table upon it's creation. First, where in the lift code are tables created? Is it in trait BaseMapper's dbAddTable method? I have an Array[String] I would like to add to the table when it is being created. Which method can I override to achieve this and how should I do so? You'd probably do something like: object MyTable extends MyTable with MetaMapper[MyTable] { private val myArray = Array(foo, bar) private val writeToNewTable() { for (s - myArray) { create.columnForString(s).save } } override def dbAddTable = Full(writeToNewTable _) } Does this help? Thanks, David Thanks! -David -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: Help on getting Eclipse/Maven/Lift working
Hi Thomas, I've been having the same troubles and found that these instructions helped me a bit: http://liftweb.net/index.php/Using_eclipse_hotdeploy if you left-click on the RunWebApp application and go to Debug As and don't see an Open Debug Dialogue option, just try clicking on Scala Application...that worked for me. Good luck! -David On Feb 2, 2:20 pm, Thomas Sant Ana maill...@gmail.com wrote: I followed the tutorial here on this page: http://scala-blogs.org/2007/12/dynamic-web-applications-with-lift-and... And was pleased to see the application come out so quickly. However I have a question. As I save the file on Eclipse they don't get picked up by Jetty. I need to do a mvn install on the pom.xml of the eclipse project. And clearing the project on eclipse broke mvn install, until I did a mvn clean then a mvn install. The tutorial references to incremental compiling. I've been working with Scala on Eclipse and got around most troubles myself. But the Eclipse+Maven+Jetty+Lift is confusing for me. I have a set of questions: a) How to get code compile incrementally on eclipse, picked up by jetty? b) How do I debug the application from eclipse? c) Is there a way to have it all running under eclipse? I know these question may seem dumb, but I'm not finding good information on google. Is there a Developing for Lift using Eclipse for Dummies arround? The best I found what this tutorial. Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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 0.10 example code
Is there Lift example code, compatible with the 0.10 version library that is more robust than the lift-blank and lift-basic archetypes highlighted here: http://liftweb.net/index.php/Archetypes I'm looking for something more like the demo available from liftweb: http://demo.liftweb.net/ Thanks, -David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@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: [ANN] Compiling Lift with Scala 2.7.2.RC2 and Eclipse Plugin
I'm using the latest version - 1.6.0.2 for windows. I got it from this website: http://code.google.com/p/msysgit/downloads/list I figured it was OK since all the versions are listed as Beta... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: [ANN] Compiling Lift with Scala 2.7.2.RC2 and Eclipse Plugin
I followed the instructions outlined by Jorge exactly and everything seemed to be working fine, but I got the following error when trying to create the liftweb git repository as outlined in Step 1: ...walk a4ce14468f18844414e001f3353b93bfb3250b91 walk 9644eaef9b6db11a6b97a3656b841a3cb0ea9ada walk bb81c1cc281e6b6f2b280349af8a4295b580f1f7 walk d1382b5493ebfe2138ffcba43da60e9b45d17600 walk 9226d239f59ac8da43e720c42d383cfb9ce9d997 walk da7ab51dbe91f4f74e5e2b96ce8a70027c197da8 walk ad2d902c0787e72b681da5765d75d67cd6eeb4f0 walk b2c974cec6ec44797eecf6d28f3188f80bf2ed35 walk dde0458bbe9109bc4d39d073d4df24821fcc11ac walk 6041d486170de4ed91c8d7f3e379658f55fef6f4 error: Unable to find c1c124c30e4fcf5c4c4371672addf2a666580657 under http://github.com/dpp/liftweb.git Cannot obtain needed tree c1c124c30e4fcf5c4c4371672addf2a666580657 while processing commit 6041d486170de4ed91c8d7f3e379658f55fef6f4. fatal: Fetch failed. the repository was not fully created as evidenced by the error that came when I tried to go on to Step 2: [EMAIL PROTECTED] /c/Source/Lift $ cd liftweb [EMAIL PROTECTED] /c/Source/Lift/liftweb $ git checkout master fatal: Not a git repository Any ideas on how I can bypass this problem? I don't even know where to start at this point. Thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Compiling Lift with Scala 2.7.2.RC2 and Eclipse Plugin
I just downloaded version 1.5.6.1 from the same site and this is the error I got this time: walk 8e1d2bbba9128fe8ce4b7a355d6fa16fe9d3dd77 walk eb09c00b327ebd51608de4f92f5831fb8e880f0d walk dbf28f10a12216b813495fced7beace239676d1a walk 089733ddff4c11a24555dc8afb57e854184544c8 walk d15137a600ce0524607ef77f2e0df0762865608a walk e7e14b91e774f06726f09d55b186b68538821435 error: Unable to find 6466f0e83a7bdca168ab17d70d77c3d82c325dbc under http://gith ub.com/dpp/liftweb.git Cannot obtain needed tree 6466f0e83a7bdca168ab17d70d77c3d82c325dbc while processing commit e7e14b91e774f06726f09d55b186b68538821435. fatal: Fetch failed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---