Cfscript and dynamic values

107 views Asked by At

I have a custom class written in java which works fine if I use hard coded data but I would like to get the data from the URL instead of hard coded

<cfscript>
   scraper = createObject("java", "AccessOS2Scraper");
   foo     = scraper.getText( "web", "2014", "https://access.acme.com/AsrDisplay.do?asrno=1432310020&icsc=SW11");
</cfscript>

My syntax is, user = web, passwd = 2014 and url = https://....

So I would like to call my page something like that

http://myserver.domain.com/mytest.cfm?user=web&passwd=2014=url=https://https://access.acme.com/AsrDisplay.do?..

How can I access these elements inside the cfscript?

1

There are 1 answers

1
Henry On BEST ANSWER

You may reference the variables via the URL scope in CF. You may want to wrap the values with JavaCast() and cast the value into the right type, just in case.