World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Dockimbel 8-Mar-2009 [4208x7] | Graham, I have a working patch that supports setting same DB virtual name to different connections URL per webapps. Here's an example definition of 2 webapps using this new feature : webapp [ virtual-root "/curecode1/" root-dir %//dev/curecode/ locales-dir %private/locales/ databases [ bugs mysql://[root-:-localhost]/bugs1 ] ] webapp [ virtual-root "/curecode2/" root-dir %//dev/curecode/ locales-dir %private/locales/ databases [ bugs mysql://[root-:-localhost]/bugs2 ] ] |
So, in order to reuse the same code for your EMR app but branching on 2 disctinct databases, you'll have to define 2 different webapps. | |
I've also patched the systray code to include the port number(s) in the yellow help message. | |
Patch available here : http://cheyenne-server.org/tmp/patch-0920.zip | |
Just replace the patched file in your current Cheyenne v0.9.19 sources folder. | |
Test this very carefully before taking it in production and report me any issue/bugs related to that patch (be sure to have checked your own code before reporting). | |
Btw, the 'databases keyword in global section is still working but the 'databases definition block in webapp will take precedence if provided. | |
Graham 8-Mar-2009 [4215] | thanks .. I'm out of town today, but will try it tonight. |
Graham 10-Mar-2009 [4216x4] | what's the process of acccessing a rsp page ? |
is this all I need ? session/start session/content/login?: yes | |
and I need an app-init.r in the web-app directory? | |
Looks like it won't work without an app-init.r | |
Dockimbel 10-Mar-2009 [4220] | An RSP page can be accessed standalone without a webapp. The webapp gives you some additional features like automatic session starting, optional authentification protection, private folders, app-init events, etc... |
Graham 10-Mar-2009 [4221] | I tried that .. and got no response |
Dockimbel 10-Mar-2009 [4222x2] | See the RSP script examples provided in %www folder from Cheyenne sources. |
I don't understand what you want to achieve with the code above? | |
Graham 10-Mar-2009 [4224x2] | access the web app folder |
I couldn't get rsp working in www/ directory | |
Dockimbel 10-Mar-2009 [4226x2] | What's your webapp folder? |
/ ? | |
Graham 10-Mar-2009 [4228x6] | no .. |
let me try this again. | |
gee, rsp is now working again in the www/ directory. | |
I was creating rsp pages writing them to the www directory and trying to browse to them ... and it wasn't working with my test.rsp page | |
Isn't the above the correct way to add a browser to the webapp? | |
well, I guess it isn't because it can't find 'login? | |
Dockimbel 10-Mar-2009 [4234x2] | I don't understand why you need this code if you're in a webapp context. |
The webapp will provide you with automatic session, so session/start is not needed (it may even mess up your session content). | |
Graham 10-Mar-2009 [4236] | If I want to login in users from a particular ip address to the webapp? |
Dockimbel 10-Mar-2009 [4237x2] | The login? session special value is used only to control access when authentication protection is set using the AUTH keyword in config file. You need to set it only when you consider that the user has provided enough credentials to let him in (for example once he has filled a login form with correct ID / pass values). |
For login users from particular IP address, just force the login? session value in the RSP script used for authentication. | |
Graham 10-Mar-2009 [4239] | so just session/login?: true |
Dockimbel 10-Mar-2009 [4240x2] | something like : <% allowed-ip: [1.2.3.4 ...] if find allowed-ip request/client-ip [ session/content/login?: yes response/redirect "home.rsp" ] %> |
See %www/testapp/login.rsp | |
Graham 10-Mar-2009 [4242] | That's similar to what I tried .. but got Invalid path value: login? |
Dockimbel 10-Mar-2009 [4243x2] | Did you removed the incorrect session/start? |
Session/start has only been provided to manually start a session for RSP scripts that are not inside a webapp. | |
Graham 10-Mar-2009 [4245] | I see. |
Dockimbel 10-Mar-2009 [4246] | I should document better session/start in RSP API doc. |
Graham 10-Mar-2009 [4247x4] | Just a little observation .... you have this timing script at the bottom of the page ( in app-init.r ) |
It inserts the html before </body> | |
the xml i was emitting also had a </body> in it ... | |
such is life :) | |
Dockimbel 10-Mar-2009 [4251] | That's for the example, you can drop it. It's not needed anymore, the timings are now (from 0.9.19) automatically inserted by the RSP engine in debug mode (when DEBUG keyword is found in the webapp config block). |
Graham 10-Mar-2009 [4252] | I dd remove it .. it was just an observation |
Dockimbel 10-Mar-2009 [4253] | Well, I think that I should make the timings optional. I'll add that to the to-do list, thanks. |
Graham 10-Mar-2009 [4254] | All this to avoid a blank Acrobat page appearing. if you call an *.xfdf file, acrobat opens up, and then the browser plugin starts up to load the remote PDF. so, you have this blank PDF on screen as well. But if I use localhost to create a web page that emits the xfdf, then I only get one browser window with the pdf and no more blank Acrobat instance. |
Robert 11-Mar-2009 [4255x2] | Has anyone tried to use things like Google API etc. from inside a RSP page? |
I'm thinking about using the js-kit.com commenting service. But I would "hide" it via a RSP page to have more control how to integrate it. | |
Kaj 13-Mar-2009 [4257] | Any idea how it compares to http://disqus.com/? |
older newer | first last |