cancel
Showing results for 
Search instead for 
Did you mean: 

URL arguments are null using Extension format - javascript

stevegreenbaum
Champ in-the-making
Champ in-the-making
I am creating a simple webscript and need to access the arguments which are passed in the URL: 
e.g., http://localhost:8080/alfresco/service/getargsWebscript/getargs/folder/site

folder and site are the arguments being passed. 

When I set the format to use arguments I can read the parameters with no problem using url.args.folder, for example.  When I use the Extension format, url.args always returns a null value.  I've tried templateargs as well, but always get null. 

Is url.args supposed to work with format extension? 
I can always parse the url, which I do receive correctly when I use extension, but url.args would be easier.
1 REPLY 1

rmorant
Champ in-the-making
Champ in-the-making
I've tried templateargs as well, but always get null.
And, url.templateArgs ?
I used like this.

<!– conf.desc.xml –>
<webscript>
  <shortname>mto-conf</shortname>
  <url>/mto/conf/{idconf}</url>
</webscript>

// javascript
var idconf = url.templateArgs.idconf;