r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!Cheyenne] Discussions about the Cheyenne Web Server

Dockimbel
8-Mar-2009
[4212x3]
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/?
Graham
14-Mar-2009
[4258x4]
I've been writing a web app which I have been distributing as a zip 
archive.  People just unzip the latest over their copy, and I ask 
them to write protect their own changes.
I don't really want to setup git or Mercurial or what ever.  Any 
alternatives?
Of course I'm hoping that the users will contribute their changes 
but realistically that is not going to happen.
Perhaps a Cheyenne rsp script that downloads a catalog, and then 
downloads any changes to the local site?