SES URL feature of Mach ii not working properly

107 views Asked by At

I have defined the following properties in mach-ii.xml file:

<property name="urlParseSES" value="true" />
<property name="urlDelimiters" value="/|/|/" />
<property name="urlBase" value="index.cfm" />

and in my index.cfm page there is a link

<a href=#BuildUrl("showUser", "id=#user_id#")#>View User</a>

in my listener I am getting the error the "Element ID is undefined in URL." Whereas I can see the parameter id and its value in the URL. Is anybody know why I am getting this error? The other problem is, when I am clicking on the other links in the page, it is keep on appending the link in the URL instead of making the new URL. First time when I am loading my site it loads css and js properly but after clicking on some link it breaks the css and js.

Please help.

1

There are 1 answers

0
Brian On

You should be referencing the id value in your listener as part of the current event structure (ie; arguments.event.getArg("id")), not the URL scope (ie; URL.id).

Your urlBase value should also be absolute from the webroot, so that if the app is at the base of your webroot, the urlBase value would be /index.cfm or if the app is inside a folder called myApp that it just off the webroot, the urlBase value would be /myApp/index.cfm