Re: Accessing Server Environment Variables

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 49103
interpreted = N
texte = Absolutely. I added the snippet as a user comment in the online 'function' docs.> -----Original Message----- > From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of > Gary Krockover > Sent: Tuesday, April 01, 2003 3:22 PM > To: WebDNA Talk > Subject: Re: Accessing Server Environment Variables > > > Hmmm, do I smell a good snippet for the interactive docs? > > :) > > GK > > > > -----Original Message----- > From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of > Scott Anderson > Sent: Tuesday, April 01, 2003 5:14 PM > To: WebDNA Talk > Subject: Re: Accessing Server Environment Variables > > > John, > > Thanks for the suggestion. Until we have an explicit WebDNA > context for > retrieving environment variables, you can use the DOS context > to grab that > information. > > Here is an example using the new WebDNA 5 function context... > > [function name=GetEnvironmentVar] > [listwords words=[DOS]Set > [/DOS]&delimiters=[unurl]%0D[/unurl]] > [showif [url][middle > startafter=&endbefore==][word][/middle][/url]=[url][params_str > ing][/url]] > [return][middle startafter==&endbefore=][word][/middle][/return] > [/showif] > [/listwords] > [/function] > > Examples:
> CLASSPATH = [GetEnvironmentVar CLASSPATH]
> OS = [GetEnvironmentVar OS]
> SystemRoot = [GetEnvironmentVar SystemRoot]
> etc... > > This could easily be adapted to work with earlier versions of WebDNA. > > > > > > > > -----Original Message----- > > From: WebDNA Talk > [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of > > John Peacock > > Sent: Tuesday, April 01, 2003 2:32 PM > > To: WebDNA Talk > > Subject: RFE: Accessing Server Environment Variables > > > > > > The more recent versions of WebSite support custom error > > handling, with a single > > file being able to handle multiple error states. In order to > > create a custom > > 404 message in WebDNA, I need to be able to access the server > > environment > > variables, in order to see the original path that was requested. > > > > For example, in Perl I would call > > > > $original_path = $ENV{'4XX_PATH'}; > > > > but WebDNA does not support this. > > > > I'd like new contexts that would work much like the > > [ListMIMEHeaders] and > > [GetMIMEHeader] tags; I propose [ListENVVariables] and > > [GetENVVariable]. These > > contexts would return the server environment variables for > > later processing. > > This feature is available in both for Windows and *nix web > > servers (I cannot > > speak to classic Mac, but that is being discontinued). > > > > Thanks > > > > John > > > > -- > > John Peacock > > Director of Information Research and Technology > > Rowman & Littlefield Publishing Group > > 4501 Forbes Boulevard > > Suite H > > Lanham, MD 20706 > > 301-459-3366 x.5010 > > fax 301-429-5748 > Web Archive of this list is at: http://webdna.smithmicro.com/ > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Accessing Server Environment Variables (Scott Anderson 2003)
  2. Re: Accessing Server Environment Variables (Gary Krockover 2003)
  3. Re: Accessing Server Environment Variables (Scott Anderson 2003)
  4. RFE: Accessing Server Environment Variables (John Peacock 2003)
Absolutely. I added the snippet as a user comment in the online 'function' docs.> -----Original Message----- > From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of > Gary Krockover > Sent: Tuesday, April 01, 2003 3:22 PM > To: WebDNA Talk > Subject: Re: Accessing Server Environment Variables > > > Hmmm, do I smell a good snippet for the interactive docs? > > :) > > GK > > > > -----Original Message----- > From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of > Scott Anderson > Sent: Tuesday, April 01, 2003 5:14 PM > To: WebDNA Talk > Subject: Re: Accessing Server Environment Variables > > > John, > > Thanks for the suggestion. Until we have an explicit WebDNA > context for > retrieving environment variables, you can use the DOS context > to grab that > information. > > Here is an example using the new WebDNA 5 function context... > > [function name=GetEnvironmentVar] > [listwords words=[DOS]Set > [/DOS]&delimiters=[unurl]%0D[/unurl]] > [showif [url][middle > startafter=&endbefore==][word][/middle][/url]=[url][params_str > ing][/url]] > [return][middle startafter==&endbefore=][word][/middle][/return] > [/showif] > [/listwords] > [/function] > > Examples:
> CLASSPATH = [GetEnvironmentVar CLASSPATH]
> OS = [GetEnvironmentVar OS]
> SystemRoot = [GetEnvironmentVar SystemRoot]
> etc... > > This could easily be adapted to work with earlier versions of WebDNA. > > > > > > > > -----Original Message----- > > From: WebDNA Talk > [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of > > John Peacock > > Sent: Tuesday, April 01, 2003 2:32 PM > > To: WebDNA Talk > > Subject: RFE: Accessing Server Environment Variables > > > > > > The more recent versions of WebSite support custom error > > handling, with a single > > file being able to handle multiple error states. In order to > > create a custom > > 404 message in WebDNA, I need to be able to access the server > > environment > > variables, in order to see the original path that was requested. > > > > For example, in Perl I would call > > > > $original_path = $ENV{'4XX_PATH'}; > > > > but WebDNA does not support this. > > > > I'd like new contexts that would work much like the > > [listmimeheaders] and > > [getmimeheader] tags; I propose [ListENVVariables] and > > [GetENVVariable]. These > > contexts would return the server environment variables for > > later processing. > > This feature is available in both for Windows and *nix web > > servers (I cannot > > speak to classic Mac, but that is being discontinued). > > > > Thanks > > > > John > > > > -- > > John Peacock > > Director of Information Research and Technology > > Rowman & Littlefield Publishing Group > > 4501 Forbes Boulevard > > Suite H > > Lanham, MD 20706 > > 301-459-3366 x.5010 > > fax 301-429-5748 > Web Archive of this list is at: http://webdna.smithmicro.com/ > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Scott Anderson

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

send mail problem? (1997) Can this be done? (1997) GuestBook example (1997) Thanks Grant (1997) Fun with Dates - finally resolved but.... (1997) Javascript help (2003) Hiding a character (2001) [WebDNA] postfix and dna (2011) Gil's in the lead (1999) Seattle based Webcatters? (2000) Version f1 status (1997) WebCatalog NT beta 18 problem (1997) If Empty ? (1997) [ot] New List. Was: Webcat no longer supported? (2006) Which beta for w* 4.1 and a problem w/b12 (1999) Another question about credit cards (1997) WebCatalog2 Feature Feedback (1996) show if date < expiry date (small corrections) (2002) [SearchString] usage (1997) Cyberstudio and WebDNA (1997)