Re: [AOLSERVER] adp files
Each Tcl block is parsed individually. As such, they need to be self contained. Your best bet is to do something along the lines of: div % if {[call_tcl_proc_here]} { ns_adp_puts The result is 1br } else { ns_adp_puts The result is 0 } % /div Or, if the blocks that would be in the ns_adp_puts section are large, break them out into separate files and use: div % if {[call_tcl_proc_here]} { ns_adp_include file1.inc } else { ns_adp_include file2.inc } % /div There choice to have each Tcl block independent is one that, I believe, has been discussed multiple times by folks much smarter than myself. The end result is that, while it has it's costs in certain ways, it also has certain benefits. For example, you can return from a Tcl block and continue on in the page at the end of that block. Robert Seeger Xavier Bourguignon wrote: Hi All, I am just starting to use adp files and I want to ask if the following code is possible: div % if {[call_tcl_proc_here]} { % The result is 1br % } else { % The result is 0 % } % /div I am asking this because when I run this I get a tcl error saying: missing close-brace How can this be? Thank you -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] adp files are not parsed
On 2005.06.25, Razvan Musaloiu-E. [EMAIL PROTECTED] wrote: I just tried everything on another machine and I got the same error. I compiled the TCL 8.4.9 and AOLserver 4.0.10 and I started the server with the sample-config.tcl with this command: bin/nsd -ft sample-config.tcl Then I put a test.adp in servers/server1/pages and I tried to access it and I got the raw file. Please cut-and-paste the contents of test.adp into an email, either to me and/or the list. -- Dossy -- Dossy Shiobara mail: [EMAIL PROTECTED] Panoptic Computer Network web: http://www.panoptic.com/ He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on. (p. 70) -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] adp files are not parsed
On 2005.06.25, Razvan Musaloiu-E. [EMAIL PROTECTED] wrote: Hi! On Fri, 24 Jun 2005, patrick o'leary wrote: Last time i saw that error was when i forgot what i was working on and started using ? instead of % That's was also my mistake. :| Thank's everyone for their time. I'm sorry for wasting your time. :-( Ah, looks like Patrick beat me to it -- yeah, I was suspecting the reason why you were getting the file contents was because you were using the wrong script-block delimiters. Glad you were able to work through your problem! -- Dossy -- Dossy Shiobara mail: [EMAIL PROTECTED] Panoptic Computer Network web: http://www.panoptic.com/ He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on. (p. 70) -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] adp files are not parsed
Hi Razvan, does the default configuration work for you (instead of fancy)? Is the adp extension mapped for the server? (should be default) ns_section ns/server/${servername}/adp ns_param map /*.adp ;# Extensions to parse as ADP's. Regards, Bernd. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] adp files are not parsed
Hi! On Fri, 24 Jun 2005, Bernd Eidenschink wrote: Hi Razvan, does the default configuration work for you (instead of fancy)? Nope. :-( Is the adp extension mapped for the server? (should be default) Yes, it is. That part looks like this: # ADP (AOLserver Dynamic Page) configuration # ns_section ns/server/${servername}/adp ns_param map /*.adp ;# Extensions to parse as ADP's. # I18N Note: will need to define I18N specifying mappings of ADP's here as well. ns_param map /*.u_adp ns_param map /*.gb_adp ns_param map /*.sjis_adp #ns_param map /*.html ;# Any extension can be mapped. ns_param enableexpirefalse ;# Set Expires: now on all ADP's. ns_param enabledebug false ;# Allow Tclpro debugging with ?debug. # ADP special pages #ns_param errorpage ${pageroot}/errorpage.adp ;# ADP error page. ns_section ns/server/${servername}/adp ns_param map /*.adp ;# Extensions to parse as ADP's. Regards, Bernd. -- RazvanME -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] adp files are not parsed
On 2005.06.24, Razvan Musaloiu-E. [EMAIL PROTECTED] wrote: No matter what I did I still get the raw .adp file. :| Does anyone encounter this problem before? Is there a way to debug this? Could you try using the sample-config.tcl _completely unmodified_ ? How are you starting the nsd -- cut and paste your command line into your reply. Do you have any other HTTP servers running on that machine other than the AOLserver you're setting up? Somehow, I suspect this might me the culprit ... -- Dossy -- Dossy Shiobara mail: [EMAIL PROTECTED] Panoptic Computer Network web: http://www.panoptic.com/ He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on. (p. 70) -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] adp files are not parsed
Razvan Musaloiu-E. wrote: No matter what I did I still get the raw .adp file. :| Does anyone encounter this problem before? Is there a way to debug this? Just out of curosity are you entering the .adp on the end of your file name? i.e. are you entering http://mysite/index.adp or just index ? I have had problems when the full index.adp is entered -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] adp files are not parsed
Hi! On Fri, 24 Jun 2005, Trenton Cameron wrote: Razvan Musaloiu-E. wrote: No matter what I did I still get the raw .adp file. :| Does anyone encounter this problem before? Is there a way to debug this? Just out of curosity are you entering the .adp on the end of your file name? i.e. are you entering http://mysite/index.adp or just index ? I have had problems when the full index.adp is entered My test file is test.adp and I enter the full path in the browser. I tried at some point to rename it to index.adp and put it in another directory but I got the same error. -- Razvan ME -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] adp files are not parsed
Hi! On Fri, 24 Jun 2005, Dossy Shiobara wrote: On 2005.06.24, Razvan Musaloiu-E. [EMAIL PROTECTED] wrote: No matter what I did I still get the raw .adp file. :| Does anyone encounter this problem before? Is there a way to debug this? Could you try using the sample-config.tcl _completely unmodified_ ? I just tried everything on another machine and I got the same error. I compiled the TCL 8.4.9 and AOLserver 4.0.10 and I started the server with the sample-config.tcl with this command: bin/nsd -ft sample-config.tcl Then I put a test.adp in servers/server1/pages and I tried to access it and I got the raw file. How are you starting the nsd -- cut and paste your command line into your reply. Do you have any other HTTP servers running on that machine other than the AOLserver you're setting up? Somehow, I suspect this might me the culprit ... I have another webserver on port 80 but sample-config.tcl uses 8000 so I guess it shouldn't this be the problem. Note: both my boxes are running Linux. -- Razvan ME -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] adp files are not parsed
Last time i saw that error was when i forgot what i was working on and started using ? instead of % but check your config file to ensure ns_section "ns/server/${servername}/adp" ns_param map "/*.adp" is there P Razvan Musaloiu-E. wrote: Hi! On Fri, 24 Jun 2005, Trenton Cameron wrote: Razvan Musaloiu-E. wrote: No matter what I did I still get the raw .adp file. :| Does anyone encounter this problem before? Is there a way to debug this? Just out of curosity are you entering the .adp on the end of your file name? i.e. are you entering http://mysite/index.adp or just index ? I have had problems when the full index.adp is entered My test file is test.adp and I enter the full path in the browser. I tried at some point to rename it to index.adp and put it in another directory but I got the same error. -- Razvan ME -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] adp files are not parsed
Hi! On Fri, 24 Jun 2005, patrick o'leary wrote: Last time i saw that error was when i forgot what i was working on and started using ? instead of % That's was also my mistake. :| Thank's everyone for their time. I'm sorry for wasting your time. :-( -- Razvan ME but check your config file to ensure ns_section ns/server/${servername}/adp ns_param map /*.adp is there P Razvan Musaloiu-E. wrote: Hi! On Fri, 24 Jun 2005, Trenton Cameron wrote: Razvan Musaloiu-E. wrote: No matter what I did I still get the raw .adp file. :| Does anyone encounter this problem before? Is there a way to debug this? Just out of curosity are you entering the .adp on the end of your file name? i.e. are you entering http://mysite/index.adp or just index ? I have had problems when the full index.adp is entered My test file is test.adp and I enter the full path in the browser. I tried at some point to rename it to index.adp and put it in another directory but I got the same error. -- Razvan ME -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.