<cfset factory = createObject('java','coldfusion.server.ServiceFactory')>

<cfset mappings = factory.runtimeService.getMappings()>

>From there you can add and remove mappings as you please.

e.g.

Add a mapping:

<cfset mappings["/test"] = "C:\somedirectory">

Remove a mapping:

<cfset structDelete(mappings,"/test")>

This is undocumented, unsupported, may change in future releases etc.

Spike

--------------------------------------------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org


>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Patricia Lee
>Sent: Wednesday, August 25, 2004 1:46 PM
>To: CF-Talk
>Subject: Scripting to add a mapping to CF Administrator
>
>Does anyone know of a script that will write a mapping to the CF
>Administrator, without the user having to open the
>administrator manually?
>
>Possible?  Too insecure for MM to have allowed?
>
>-P
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to