[Lift] Re: Issue, The URL params can't contains & ? ****

2010-03-09 Thread Neil.Lv
On Mar 9, 9:56 pm, Marius wrote: > You need to do URL encoding first. Helpers.urlEcnode(str) does this. > case RewriteRequest( ParsePath(List("download", link), "html", _, _), GetRequest, _) => RewriteResponse(List("download"

[Lift] Issue, The URL params can't contains & ? ****

2010-03-09 Thread Neil.Lv
Hi all, I have a silly question about the URL rewrite . How to let the URL params can contains the & character. Here is the code: ### The url rewrite. case RewriteRequest( ParsePath(List("download", link), "html", _, _), GetRequest, _)

[Lift] Re: Issue, The URL params can't contains & ? ****

2010-03-09 Thread Neil.Lv
I want get the these strings ( http://test.com/file.zip&12345678 ) from the URL (http://localhost:8080/download.html?link=http://test.com/ file.zip&12345678) Thanks very much! Cheers, Neil -- You received this message because you are subscribed to the Google Groups "Lift" group. To

[Lift] Re: About the url rewrite (more thant one params and get 404 not found error)

2010-03-01 Thread Neil.Lv
OK, Got it, Thank you very much! On Mar 2, 3:01 am, David Pollak wrote: > On Sun, Feb 28, 2010 at 8:28 PM, Neil.Lv wrote: > > Hi all, > > > I have a silly question about the url rewrite in the lift. > > It has another two params in the url after the img. > > >

[Lift] Re: About the url rewrite (more thant one params and get 404 not found error)

2010-03-01 Thread Neil.Lv
I add these code in the Boot class, but it doesn't work. How can write the correct code to parse the url ? # object ParamsExtractor { def unapply(pp: ParsePath): Option[(String)] = { Log.info("wholePath: " + pp.wholePath) val path = List("test") val result:Box[(String)] = i

[Lift] Re: About the url rewrite (more thant one params and get 404 not found error)

2010-03-01 Thread Neil.Lv
On Mar 1, 5:10 pm, Jeppe Nejsum Madsen wrote: > Ahh yes, the example was from a Loc rewrite, The principle is the same I > guess, you should be able to do something like this: > > case RewriteRequest(ParamsExtractor(account,orgUnit) , _, _) => > RewriteResponse(path, Map("account" -> account,

[Lift] Re: About the url rewrite (more thant one params and get 404 not found error)

2010-03-01 Thread Neil.Lv
On Mar 1, 3:53 pm, Jeppe Nejsum Madsen wrote: > > I'm not sure if this can be handled with the standard ParsePath, but it > is fairly easy to write your own extractor that can handle more complex > scenarios. Here's an example: > > object ParamsExtractor { > def unapply(pp:ParsePath): Opti

[Lift] About the url rewrite (more thant one params and get 404 not found error)

2010-02-28 Thread Neil.Lv
Hi all, I have a silly question about the url rewrite in the lift. It has another two params in the url after the img. http://localhost:8080/show/img/version/id The url works fine. => http://localhost:8080/show/img => http://localhost:8080/show/img/v1/ => http://localhost:8080/show

[Lift] Re: (ISSUE) How to use the sbt with lift project ?

2010-01-30 Thread Neil.Lv
I use this command "~ jetty-restart" and it can get continuous compilation and deployment. Thanks! Cheers, Neil On Jan 31, 1:10 pm, "Neil.Lv" wrote: >   It works now, but when i changing a file(HelloWorld.scala) in the > snippet, it doesn't re-c

[Lift] Re: (ISSUE) How to use the sbt with lift project ?

2010-01-30 Thread Neil.Lv
Hi, Lift version is: 2.0-M1, i deleted all the files in the G:/Documents and Settings/Ruby/.ivy2/ directory but get these errors too. # [warn] :: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :

[Lift] Re: (ISSUE) How to use the sbt with lift project ?

2010-01-30 Thread Neil.Lv
I have changed the code. use this code in the G:\project\test\project \TestProject.scala file, and get this error. > The jetty val you are overriding is an internal val that you shouldn't > be doing anything with. If you change that line to: > > val jetty6 = "org.mortbay.jetty" % "jetty" % "6.

[Lift] (ISSUE) How to use the sbt with lift project ?

2010-01-29 Thread Neil.Lv
Hi all, How to use the sbt with lift project ? I try to use the sbt and get this errors, Does anybody know what's wrong with it ? Maybe i missing something else ? Here is the log: # I create this file like this in the build directory. G:\project\test\pr

[Lift] Re: Solr (or external API), curl, scala dispatch library, Quartz scheduling questions

2010-01-26 Thread Neil.Lv
Thanks, I have found it here, http://dispatch.databinder.net/Stdout_Walkthrough I have imported the Http package and it works now, ### import Http._ ### Thanks again, this article is very helpful. Cheers, Neil On Jan 27, 9:57 am, "Neil.Lv" wrote: > Hi, > >

[Lift] Re: Solr (or external API), curl, scala dispatch library, Quartz scheduling questions

2010-01-26 Thread Neil.Lv
Hi, I have a silly question about the http package. What's the package should be imported when using the dispatch? I try this code of the wiki, and get this error. error: not found: value http ### I have import the dispatch package, and where is the http ? import dispatch._ ### Th

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Neil.Lv
On Jan 22, 10:06 am, Naftoli Gugenheim wrote: > 'mvn clean' deletes them for you. > > - Got it, Thank you very much! Cheers, Neil -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send ema

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Neil.Lv
ght of the screen buffer size. > > ----- > > Neil.Lv wrote: > > Here is the lastest code now, g...@github.com:anim510/two_db_demo.git > > start server and visit:http://localhost:8080/and get this error, In > the cmd I can't see all the

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Neil.Lv
ondConnection => > >   // do transactional query between two DBs here > > } > } > > Note that DB.use nests such that the transaction will only be committed when > the last DB.use block for a given ConnectionIdentifier is exited. > > > > On Thu, Jan 2

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Neil.Lv
I have added the demo code on the Github now. ( Mabye it's a bug with DB.runQuery and DB.use in the two db vender ) Here is the address: http://github.com/anim510/two_db_demo Thanks very much! Cheers, Neil On Jan 21, 11:26 am, "Neil.Lv" wrote: >   My

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
My email is : anim...@gmail.com On Jan 21, 11:17 am, "Neil.Lv" wrote: > Mabye it's a bug with DB.runQuery and DB.use in the two db vender > > Two question: (problem) > > 1: I don't know why the HelloWorld snippet code will be execute 2 > times i

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
anks very much! #### Cheers, Neil On Jan 21, 1:56 am, "Neil.Lv" wrote: > The DB.runQuery can works now, but the DB.prepareStatement also > cant' work. > > Here is the test app address: > http://github.com/anim510/two_db_demo > > Cheers, > Neil

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
The DB.runQuery can works now, but the DB.prepareStatement also cant' work. Here is the test app address: http://github.com/anim510/two_db_demo Cheers, Neil On Jan 21, 1:16 am, "Neil.Lv" wrote: >    Thank you very much, > >    But it doesn't work yet,

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
Thank you very much, But it doesn't work yet, maybe because of using two db connections. I'll test it later again. On Jan 21, 12:44 am, Jeppe Nejsum Madsen wrote: > "Neil.Lv" writes: > > Hi all, > > >   I use two db connections in my app, and

[Lift] How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
Hi all, I use two db connections in my app, and I want to use DB.prepareStatement to select the records from the second db. It failed, Here is the code: ### def getHotByTid(id : Long) = DB.use(bootstrap.liftweb.TwoDB) { conn => DB.prepareStatement("SELECT * FROM hots WHE

[Lift] Re: Two database are broken in 1.1-M8, works fine in 1.1-M7 .

2010-01-13 Thread Neil.Lv
David, Thank you very much! It works now, I'm so sorry about that I didn't see the yak demo yesterday . :) Cheers, Neil On Jan 14, 12:43 pm, David Pollak wrote: > On Wed, Jan 13, 2010 at 6:18 AM, Neil.Lv wrote: > > Hi David, > > > I'm sor

[Lift] Re: Two database are broken in 1.1-M8, works fine in 1.1-M7 .

2010-01-13 Thread Neil.Lv
de is you are using the same connection vendor > for both connection identifiers *and* you're not defining a vendor for > the DefaultConnectionIdentifier > > On Jan 11, 7:05 am, "Neil.Lv" wrote: > > > Hi all, > > >    There is a problem when i upgrading

[Lift] Re: **IMPORTANT** Lift 2.0 Milestone1 is coming and it's time to test the SNAPSHOT in master

2010-01-12 Thread Neil.Lv
Oh, I'm sorry about that I forget pasting the topic url. Here is : http://groups.google.com/group/liftweb/browse_thread/thread/6ca3fd7deb41b1f9 Thank you very much! Cheers, Neil On Jan 13, 2:48 am, David Pollak wrote: > On Tue, Jan 12, 2010 at 6:47 AM, Neil.Lv wrote: &g

[Lift] Re: **IMPORTANT** Lift 2.0 Milestone1 is coming and it's time to test the SNAPSHOT in master

2010-01-12 Thread Neil.Lv
Hi all, Maybe the mapper is broken in M8 ? I use only one database in M8 ( upgrade from M7) it works fine, but use two db connection and it doesn't work. (works fine in M7). Here is the topic about this issue. Thank you very much for any help! Cheers, Neil -- You received this

[Lift] Two database are broken in 1.1-M8, works fine in 1.1-M7 .

2010-01-11 Thread Neil.Lv
Hi all, There is a problem when i upgrading the 1.1-M7 to 1.1-M8, the db connection is broken. I use two database connection in my app, it's broken in 1.1-M8. ### object OneDB extends ConnectionIdentifier { override def jndiName = "lift_proto" } object TwoDB extends ConnectionIdentifier {

[Lift] Re: JNDI error when switching to M8 ?

2010-01-11 Thread Neil.Lv
Does anyone know that what's wrong with it ? Cheers, Neil On Jan 10, 9:50 pm, "Neil.Lv" wrote: > Here is the test code . > > g...@github.com:anim510/two_db_demo.git > > It works fine when using only one database, it failed when using two > db conn

[Lift] Re: JNDI error when switching to M8 ?

2010-01-10 Thread Neil.Lv
Here is the test code . g...@github.com:anim510/two_db_demo.git It works fine when using only one database, it failed when using two db connection. Thanks.! Cheers, Neil On Jan 10, 5:04 pm, "Neil.Lv" wrote: > Hi all, > >    There is a problem that i switch the

[Lift] JNDI error when switching to M8 ?

2010-01-10 Thread Neil.Lv
Hi all, There is a problem that i switch the M7 to M8, the JNDI is error. I didn't change anything before moving M7 to M8. It seems that the Lift looks for the lift ConnectionIdentifier not the OneDB or TwoDB. ### java.lang.NullPointerException: Looking for Connection Identifier Connec

[Lift] How many memory are assigned by default when starting the Jetty ?

2010-01-08 Thread Neil.Lv
Hi all, I have a silly question about the memory of the jetty. How many the memory are assigned by default when starting the Jetty server? There is a problem that I do some operation for about 30 minutes, then the jetty was crashed. The error message is that the memoryOutOfBound

[Lift] Re: Example project -- Image gallery

2010-01-06 Thread Neil.Lv
Thanks for sharing this, it's very useful and helpful to us (beginner). Cheers, Neil On Jan 7, 1:20 am, David Pollak wrote: > Thanks for sharing! > > Double thanks for spelling my last name correctly!! > > > > On Wed, Jan 6, 2010 at 9:12 AM, Jim Wise wrote: > > I've put the image gallery co

[Lift] Re: Happy New Year!

2009-12-30 Thread Neil.Lv
Thank you and Happy New Year to all the Lifter! Cheer, Neil On Dec 30, 9:48 pm, Marius wrote: > Thank you. Happy new year to you too. > > Br's > Marius > > On Dec 30, 2:12 pm, koveen wrote: > > > I would like to wish everybody on this list a happy new year. > > A year in which it will be f

[Lift] Re: How to reRender the page via js in Chat demo of the lift ?

2009-12-28 Thread Neil.Lv
the difference between the incoming > updates and your current chats. > > Derek > > On Sat, Dec 19, 2009 at 3:47 AM, Neil.Lv wrote: > > Hi all, > > >  How to reRender the page via js in Chat demo of the lift ? > > >  Here is an example: > > ###  In the in

[Lift] Re: How could i send a HTTP get or post request in the Snippet or Views in the Lift?

2009-12-22 Thread Neil.Lv
ng other snippets to > > process and the result will be merged into the HTTP response right > > before sending the response to the client. Note that you need to set > > LiftRules.allowParallelSnippets > > > Br's, > > Marius > > > On Dec 22, 8:3

[Lift] Re: About the Chat demo of the Lift?

2009-12-21 Thread Neil.Lv
> 13585201588http://maweis.com > > On Tue, Dec 22, 2009 at 2:31 PM, Neil.Lv wrote: > > Hi all > > > I have a silly question about the Chat demo. > > > How could i create a Chat room in this demo ? > > > Maybe i can define a variable or some other method to

[Lift] How could i send a HTTP get or post request in the Snippet or Views in the Lift?

2009-12-21 Thread Neil.Lv
Hi all, How could i send a HTTP get or post request in the Snippet or Views in the Lift? For example, the weather API . I want to send an HTTP get request or post request to another website that it supplies some APIs, then in the lift we can receive the return data such as XML data, so

[Lift] About the Chat demo of the Lift?

2009-12-21 Thread Neil.Lv
Hi all I have a silly question about the Chat demo. How could i create a Chat room in this demo ? Maybe i can define a variable or some other method to achieve the purpose ! Now all the people are in the same Chat room ( global ) in the example, so i want to create more than one Cha

[Lift] Re: How can i get the user IP address in the lift ?

2009-12-20 Thread Neil.Lv
ing], so we can get access and provide a > handy default if need be. If you dont want that, just do a pattern > match or whatever you want. > > Cheers, Tim > > On Dec 20, 2:38 am, Jarod Liu wrote: > > > S.containerRequest.map(r=>println(r.remoteAddress)) > > &g

[Lift] How can i get the user IP address in the lift ?

2009-12-19 Thread Neil.Lv
Hi all, I want to get the IP address of the users. How can i get the remote IP address in the lift? Thanks for any suggestion! Cheers, Neil -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googl

[Lift] Re: How can i specify the Interval time for the Comet ?

2009-12-19 Thread Neil.Lv
You could probably keep for each message the timestamp and > look for the frequencies when the same message is posted. > > Br's, > Marius > > On Dec 19, 5:37 pm, "Neil.Lv" wrote: > > >    If there are many people in the Chat room, and there is a person &g

[Lift] Re: How can i update and insert record into database via Raw sql in Lift?

2009-12-19 Thread Neil.Lv
E statement; or an SQL > statement that returns nothing, such as a DDL statement. > >  return ResultSet       executeQuery() >           Executes the SQL query in this PreparedStatement object and > returns the ResultSet object generated by the query. > > FYI > > Marcin, >

[Lift] Re: How can i specify the Interval time for the Comet ?

2009-12-19 Thread Neil.Lv
ntinuous long poll that is currently implemented? > > Thanks, > > David > > > > On Sat, Dec 19, 2009 at 5:01 AM, Neil.Lv wrote: > > Hi all, > > >  How can i specify the Interval time for the Comet ? > > >  Just like the chat demo in the lift examples

[Lift] How can i specify the Interval time for the Comet ?

2009-12-19 Thread Neil.Lv
Hi all, How can i specify the Interval time for the Comet ? Just like the chat demo in the lift examples, i have a problem that how to set the interval time for the every http request ? That means the user only post the message to the comet every 3 seconds, and doesn't post the message all

[Lift] Re: How to redirect to a specify url when logged in successfully?

2009-12-19 Thread Neil.Lv
t; > On Thu, Dec 3, 2009 at 5:44 AM, Neil.Lv wrote: > >  I added this code in the User model, but it doesn't work yet. > > >  This println method is never executed. > > >  Maybe some configuration need to be set ? > > > ### > > object User exten

[Lift] How to reRender the page via js in Chat demo of the lift ?

2009-12-19 Thread Neil.Lv
Hi all, How to reRender the page via js in Chat demo of the lift ? Here is an example: ### In the index page, show all the message that the users sent user 1: message 1 user 2: message 2 user 3: message 3 user 4: message 4 user 5: message 5 ### Here are 5 messages, then i want to refresh

[Lift] Re: How can i update and insert record into database via Raw sql in Lift?

2009-12-18 Thread Neil.Lv
It works now. I use the same executeUpdate method, and it can insert into the db. Thanks Marcin, Cheers, Neil On Dec 19, 1:29 am, "Neil.Lv" wrote: > Hi Marcin, > >    Thank you very much! The update statement works now! > >    There is a question about the in

[Lift] Re: How can i update and insert record into database via Raw sql in Lift?

2009-12-18 Thread Neil.Lv
jection in many situations (mostly > where string is passed to query) > > Marcin, > > On 18 Gru, 15:45, "Neil.Lv" wrote: > > > Hi all, > > >    How can i update and insert record into database via Raw sql in > > Lift? > > >    I wri

[Lift] How can i update and insert record into database via Raw sql in Lift?

2009-12-18 Thread Neil.Lv
Hi all, How can i update and insert record into database via Raw sql in Lift? I write some code but it failed, here is : ### In the model def updateClickCountsById(id: Long) = DB.runQuery("UPDATE blogs set click_counts=click_counts+1 WHERE id=1") def insertRecord() = DB.runQu

[Lift] Re: How can bind more than one element in the render method in CometActor ?

2009-12-08 Thread Neil.Lv
;s render method . Thanks! Cheers, Neil On Dec 9, 11:53 am, David Pollak wrote: > Neil, > > bind() works the same everywhere... CometActors, Helpers.bind, etc. > > If you are having a problem with bind, I would strongly recommend writing a > test with a template that allows your

[Lift] Re: How can bind more than one element in the render method in CometActor ?

2009-12-08 Thread Neil.Lv
### ### ... ... ### Thanks! Cheers, Neil On Dec 9, 12:49 am, "Neil.Lv" wrote: >   BTW, when the partialUpdate method is called , the result is > correct. > >   But when refreshing the browser or open a new browser,

[Lift] Re: How can bind more than one element in the render method in CometActor ?

2009-12-08 Thread Neil.Lv
BTW, when the partialUpdate method is called , the result is correct. But when refreshing the browser or open a new browser, the result also is 3, Cheers, Neil On Dec 9, 12:44 am, "Neil.Lv" wrote: > Hi all, > >    How can bind more than one element in the render met

[Lift] How can bind more than one element in the render method in CometActor ?

2009-12-08 Thread Neil.Lv
Hi all, How can bind more than one element in the render method in CometActor ? The msg1 is an ### class TestComet extends CometActor { override def defaultPrefix = Full("info") ... def render = { bind("One" -> 1, "Two" -> 2,

[Lift] Re: (Maybe it's a bug ?) About the Schedule's execute counts in the ActorComet

2009-12-07 Thread Neil.Lv
Hi David, The demo is sent to you, please check it. Thanks ! Cheers, Neil On Dec 7, 10:26 pm, David Pollak wrote: > On Mon, Dec 7, 2009 at 5:45 AM, Neil.Lv wrote: > > >   I think maybe it's a bug ~? > > >   Btw, Does anybody know how to convert the Come

[Lift] Re: (Maybe it's a bug ?) About the Schedule's execute counts in the ActorComet

2009-12-07 Thread Neil.Lv
de def localSetup = { println(" localSetup: " ) super.localSetup this ! Tick } override def lowPriority = { case Tick => { println(" Tick ") foos = FooManager.getFoos reRender(false) ActorPing.schedule(this, Tick, 10 seconds) } } }

[Lift] Re: (Maybe it's a bug ?) About the Schedule's execute counts in the ActorComet

2009-12-07 Thread Neil.Lv
(GET) /comet_request/16073680948/b0iubsv7usc1 took 0 Mill iseconds INFO - Service request (GET) /comet_request/48475840285/b0iubsv7usc1 took 16 Mil liseconds ### I set the time is 10 seconds, but here is wrong. Does anybody know about the issue ? Cheers, Neil On Dec 4, 3:00 pm, "Ne

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
It works now, I missing the dbDefaultConnectionIdentifier definition in the others models. Thank you very much! :) Cheers, Neil On Dec 7, 12:06 am, "Neil.Lv" wrote: >   Thanks Tim, > >   I have tried it in my code but it doesn't work yet! > >   The lift

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
Thanks Tim, I have tried it in my code but it doesn't work yet! The lift version is: 1.1-M7 Scala Version is: 2.7.7 Cheers, Neil On Dec 6, 10:52 pm, Tim Nelson wrote: > I did some more digging and got a sample app to work. You can see the code > here:http://github.com/eltimn/lift

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
harding? If not I > think you just want to override dbDefaultConnectionIdentifier > > Tim > > On Sun, Dec 6, 2009 at 6:01 AM, Neil.Lv wrote: > > >  If i remove the  DB.defineConnectionManager > > (DefaultConnectionIdentifier, DBVendor) > > >  This error message occurs. > &

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
ager(OneDB, DBVendor) > DB.defineConnectionManager(TwoDB, DBVendor) > > Tim > > On Sun, Dec 6, 2009 at 4:17 AM, Neil.Lv wrote: > > > Here is the db url, > > > db.url1=jdbc:mysql://localhost:3306/blog1 > > db.url2=jdbc:mysql://localhost:3306/blog2 > > > Chee

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
, which you don't > want to use. You want to change this to use your 2 defined > identifiers. Ie: > > DB.defineConnectionManager(OneDB, DBVendor) > DB.defineConnectionManager(TwoDB, DBVendor) > > Tim > > On Sun, Dec 6, 2009 at 4:17 AM, Neil.Lv wrote: > > > He

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
Here is the db url, db.url1=jdbc:mysql://localhost:3306/blog1 db.url2=jdbc:mysql://localhost:3306/blog2 Cheers, Neil On Dec 6, 4:00 pm, "Neil.Lv" wrote: > In the Boot.scala > ### > class Boot { >   def boot { >     if (!DB.jndiJdbcConnAvailable_?) >    

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
= Blog // what's the "meta" server ... override def dbCalculateConnectionIdentifier = { // ## dbCalculateConnectionIdentifier case _ => Two } } ### I add the "override def dbCalculateConnectionIdentifier" method in every models But everytime it uses

[Lift] Re: How to configure two database connection in Lift?

2009-12-05 Thread Neil.Lv
The two databases that have different structure of the tables, such as two applications databases. Cheers, Neil On Dec 6, 2:38 pm, "Neil.Lv" wrote: >    Btw, there is the error message when the server is started. > ### > scala.MatchError: ConnectionIdentifier(lift) >

[Lift] Re: How to configure two database connection in Lift?

2009-12-05 Thread Neil.Lv
Btw, there is the error message when the server is started. ### scala.MatchError: ConnectionIdentifier(lift) ### On Dec 6, 1:47 pm, "Neil.Lv" wrote: > Hi all, > >   I want to use two databases, but i don't know how to configure it. > >   Does anybody know that

[Lift] How to configure two database connection in Lift?

2009-12-05 Thread Neil.Lv
Hi all, I want to use two databases, but i don't know how to configure it. Does anybody know that how to configure two database connection in Lift? 1: I add two ConnectionIdentifier in the Boot.class ### object OneDB extends ConnectionIdentifier { def jndiName = "one" } object TwoDB

[Lift] (Maybe it's a bug ?) About the Schedule's execute counts in the ActorComet

2009-12-03 Thread Neil.Lv
Hi all, Here is an example code that about the ActorComet. ### package com.liftcode.comet import net.liftweb._ import http._ import js._ import JsCmds._ import net.liftweb.common._ import net.liftweb.util._ import Helpers._ import net.liftweb.http._ import _root_.scala.xml._ import scala.acto

[Lift] Re: How to redirect to a specify url when logged in successfully?

2009-12-03 Thread Neil.Lv
5 am, David Pollak wrote: > On Sun, Nov 29, 2009 at 12:17 AM, Neil.Lv wrote: > > Hi all, > > >   I want to redirecto to a specify URL like this "/all_users" when > > logged in successfully via the default link, > >http://localhost:8080/user_mgt/login > &

[Lift] Re: How to use the ActorPing schedule ? in the lift .

2009-12-02 Thread Neil.Lv
ng behaviour, just put a call to actor > ping at the end of the Z method to reschedule it. > > That should be all you need. > > Cheers, Tim > > On 2 Dec 2009, at 16:39, Neil.Lv wrote: > > > Hi all, > > > I want to query the records of the RMDBS every several

[Lift] How to use the ActorPing schedule ? in the lift .

2009-12-02 Thread Neil.Lv
Hi all, I want to query the records of the RMDBS every several minutes. Does use the ActorPing or something else to achieve this purpose ? Is there an example that about the ActorPing ? Thanks for any suggestion ! Cheers, Neil -- You received this message because you are subscr

[Lift] Re: How to fix the bug in firefox that application/xhtml+xml doesn't have the write() method ?

2009-12-02 Thread Neil.Lv
xml parser checks for well-formedness of the xml. You should > be able to use things like appendChild(). > > Regards > > Arthur > > On 2 Dez., 13:42, "Neil.Lv" wrote: > > > Hi all, > > >    How to fix the bug in firefox that application/xhtml+xml d

[Lift] How to fix the bug in firefox that application/xhtml+xml doesn't have the write() method ?

2009-12-02 Thread Neil.Lv
Hi all, How to fix the bug in firefox that application/xhtml+xml doesn't have the write() method ? The document object created in Firefox when the mime type is application/xhtml+xml does not have the write() method. I have a script that need to use the document.write method in the lift

[Lift] Re: How to redirect to a specify url when logged in successfully?

2009-11-29 Thread Neil.Lv
> Br's, > Marius > > On Nov 29, 11:55 am, "Neil.Lv" wrote: > > > The /user_mgt/login link is supported by the Lift's User Module. > > > Maybe can i override some method to change the param of the > > redirectTo method .? > > > What

[Lift] Re: How to redirect to a specify url when logged in successfully?

2009-11-29 Thread Neil.Lv
oing the login > processing you can call S.redirectTo("/all_users") from your submit > function. > > Br's, > Marius > > On Nov 29, 10:17 am, "Neil.Lv" wrote: > > > Hi all, > > >    I want to redirecto to a specify URL like this &qu

[Lift] How to redirect to a specify url when logged in successfully?

2009-11-29 Thread Neil.Lv
Hi all, I want to redirecto to a specify URL like this "/all_users" when logged in successfully via the default link, http://localhost:8080/user_mgt/login Is there a help method (i dont't find it) to configure it? When i logged in successfully via /user_mgt/login link and redirect to the

[Lift] Re: How to get the servlet context

2009-11-29 Thread Neil.Lv
Hi Jeppe, I have the same question about the image folder. Can you paste come example code ( or link ) that the Nginx how to configure the mapping URL for images ? And I'm not familiar with it. Thank you very much! Cheers, Neil On Nov 29, 4:53 am, jhonig wrote: > > Use explicitly

[Lift] Re: Building war for production mode.

2009-11-28 Thread Neil.Lv
ame > db.user = my_user > db.password = my_pass > > to production.default.props. On the "production" server I user Tomcat > with -Drun.mode=production. > > I hope you get some ideas about my configuration. > > Leo > > On Nov 28, 11:02 am, "Neil.Lv" wrot

Re: [Lift] Re: Can't find the jdbc:mysql driver in Production Mode ?

2009-11-28 Thread Neil.Lv
= Text(Props.modeName) > } > > On a page: > > > > And the mode will be listed (or blank for development mode) > > On Sat, Nov 28, 2009 at 6:23 AM, Neil.Lv wrote: > > > > > I missing the production.default.props file in the /src/main/ > > resources/props folde

Re: [Lift] Re: Can't find the jdbc:mysql driver in Production Mode ?

2009-11-28 Thread Neil.Lv
Requested URL/fsdfwas not found on this server Is it in the production mode now? Cheers, Neil David Pollak wrote: > Do a println to output the value of Props.get("db.driver") > > On Sat, Nov 28, 2009 at 6:06 AM, Neil.Lv wrote: > > > > > It generated by

[Lift] Re: Can't find the jdbc:mysql driver in Production Mode ?

2009-11-28 Thread Neil.Lv
mysql.jdbc.Driver db.url=jdbc:mysql://localhost:3306/project db.user=root db.password=root ### Cheers, Neil On Nov 28, 7:57 pm, Timothy Perrett wrote: > Paste your database connection object? its probably that you copied the one > from lift examples and you are now missing the correct properties f

[Lift] Can't find the jdbc:mysql driver in Production Mode ?

2009-11-28 Thread Neil.Lv
Hi all, I have a silly question about the lift app that deployed on the Jetty server. Can't find the jdbc:mysql driver in Production Mode ? It will use the derby to instead of the mysql. But it works fine in the Development Mode. I will craete the derby file in the jetty folder. /h

[Lift] Re: Building war for production mode.

2009-11-28 Thread Neil.Lv
(It the development mode it can find the jdbc:mysql driver) I don't know what's the problem with it . Thanks for any help! Cheers, Neil On Nov 28, 3:48 pm, "Neil.Lv" wrote: > I have the same issue, is add this statement into /home/jetty6/bin/ > jetty.sh > &

[Lift] Re: Building war for production mode.

2009-11-28 Thread Neil.Lv
(It the development mode it can find the jdbc:mysql driver) I don't know what's the problem with it . Thanks for any help! Cheers, Neil On Nov 28, 3:48 pm, "Neil.Lv" wrote: > I have the same issue, is add this statement into /home/jetty6/bin/ > jetty.sh > &

[Lift] Re: Building war for production mode.

2009-11-27 Thread Neil.Lv
I have the same issue, is add this statement into /home/jetty6/bin/ jetty.sh ### echo "JAVA_OPTIONS=-Drun.mode=production" >> /home/jetty6/bin/ jetty.sh ### then restart the jetty server, but it alwasy show the Development Mode information "The requested page was not defined in your SiteMap,

[Lift] Re: Jetty or Tomcat, Which web container is recommended to use to deploy the Lift app ?

2009-11-19 Thread Neil.Lv
If i use "LVS + Nginx + Haproxy + Tomcat " to deploy the app, Can it work with Apache at simultaneously ? Cheers, Neil On Nov 20, 9:35 am, "Neil.Lv" wrote: > Hi all, > >   I have a silly question about the deploy. > >   Which web container is recomm

[Lift] Jetty or Tomcat, Which web container is recommended to use to deploy the Lift app ?

2009-11-19 Thread Neil.Lv
Hi all, I have a silly question about the deploy. Which web container is recommended to use to deploy the Lift app ? Jetty or Tomcat ? I want to use the Comet to push the data in the app. * Apache + Tomcat ? * Apache + what ? * Nginx + what ? Thanks for any suggestion ! Cheers,

[Lift] Re: RequestVar doesn't work in the Lift1.1-SNAPSHOT ?

2009-11-17 Thread Neil.Lv
-tools.org.snapshots > Scala-Tools Maven2 Repository for Snapshots > http://scala-tools.org/repo-snapshots > > > > On Nov 17, 2009, at 9:32 PM, Neil.Lv wrote: > > > > > When i delete all the repository file, then us

[Lift] Re: RequestVar doesn't work in the Lift1.1-SNAPSHOT ?

2009-11-17 Thread Neil.Lv
quired artifacts are missing. for artifact: demo.helloworld:helloworld:war:1.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2), scala-tools.org (http://scala-tools.org/repo-releases) ## Cheers, Neil On Nov 18, 9:34 am, "Neil.Lv

[Lift] Re: RequestVar doesn't work in the Lift1.1-SNAPSHOT ?

2009-11-17 Thread Neil.Lv
Trait ... ? I use the RequestVar to save the item that will be edited in the edit page. Cheers, Neil On Nov 18, 12:42 am, David Pollak wrote: > On Tue, Nov 17, 2009 at 8:23 AM, Neil.Lv wrote: > > Hi all, > > > The RequestVar doesn't work in the Lift1.1-SNAPSHOT,

[Lift] RequestVar doesn't work in the Lift1.1-SNAPSHOT ?

2009-11-17 Thread Neil.Lv
Hi all, The RequestVar doesn't work in the Lift1.1-SNAPSHOT, The error message is: ### object creation impossible, since method testWasSet in trait AnyVarTrait of type (String)Boolean is not defined object currentItemVar extends RequestVar[Item]({ ### The code is : ### object currentI

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-15 Thread Neil.Lv
very much! Cheers, Neil On Nov 15, 11:10 pm, "Neil.Lv" wrote: > It try to deploy the war to the tomcat5.5.25, and the path is > different. > > Use LiftRules.getResource("/images/") to get this information: > >In the dev box: >--> Pat

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-15 Thread Neil.Lv
/demo-1.0/images/ The war of the demo path: D:\tomcat_5.5.25\webapps\demo-1.0 So that how can i resolve this problem ? Cheers, Neil On Nov 15, 9:57 pm, "Neil.Lv" wrote: > Tim, > >   I'm not clear that how to do use the caching proxy and maps a URL to > the dispat

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-15 Thread Neil.Lv
abase hit. > > This has been discussed a fair few times on the list if i remember rightly, > so best off searching the archives if your not sure where to start. > > Cheers, Tim > > On 15 Nov 2009, at 04:16, Neil.Lv wrote: > > > > >  I want to save the images t

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-14 Thread Neil.Lv
I want to save the images to a directory, because this images will be used in the flash params. This file path will be used in the javascript code . ### var imag=new Array(); imag[3]="/images/01.jpg"; ### Cheers, Neil On Nov 15, 12:05 pm, "Neil.Lv" wrote: > H

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-14 Thread Neil.Lv
item.receipt(data).receiptMime(mime) // ( Array[Byte] that saved into database ) ### :) Thanks very much ! Cheers, Neil On Nov 15, 5:43 am, David Pollak wrote: > On Sat, Nov 14, 2009 at 10:25 AM, Neil.Lv wrote: > > > Tim, > > >  haha, yeah. > > >

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-14 Thread Neil.Lv
Nov 15, 1:50 am, Timothy Perrett wrote: > Hmm, I guess you must be new to the JVM - you cant write a file inside a WAR > file; it does not work like that. > > You'll need to write to a fully qualified path (as per my example). > > Cheers, tim > > On 14 Nov 2009, a

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-14 Thread Neil.Lv
tring in the lift ? G:\project\demo\src\main\webapp\images ( To save the file into this path, G:\project\demo\src\main\webapp \images\003.jpg ) Cheers, Neil On Nov 15, 1:34 am, "Neil.Lv" wrote: >   It show this error message: > >   ERROR - java.io.FileNotFoundException: \imag

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-14 Thread Neil.Lv
t;   in = 0} catch { > >   case e => Log.error(e) > > } finally { >   buff.close() > } > buff = null > } > > In my case, I had the data as an input stream - manipulate this code > to take it however you need. > > Cheers, Tim > > On Nov

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-13 Thread Neil.Lv
} catch { case e => println("exception: " + e) } e.receipt(data).receiptMime(mime) true } I don't know how to write the code in the try catch statement. Does anyone can help me ?~ Thanks very much ! Cheers, Neil On Nov 14, 1:58 pm, "Neil.Lv"

  1   2   >