Hi, You are right, there should be no leading slash. Lack of leading slash emphasis that it is not absolute path to templates. The path in return tuple (like {template, ..path..}) is trailing part of final path, which is build basing on root_template environment variable (by default it is "/<server_path>/templates").
To see how it is used and how to modify defaults see eptic/src/e_conf.erl (line 366). Michal Zajda ----- "jm" <je...@ghostgun.com> wrote: > I notice that the following code causes a 501 error, > > do_add(_Args) -> > case validate_tool:validate_cu(item, create) of > {ok, Item} -> > wtype_item:create(Item), > {redirect, "/item/all"}; > {error, _Reason} -> > wpart:fset("__edit", wtype_item:prepare_validated()), > {template, "/item/add.html"} > end. > > but changing the template line to, note lack of leading slash, > > {template, "item/add.html"} > > fixes the problem. This appear to be what it should be as the matching > > instructed entry for dispatch.conf is > > {static, "^/item/add$", "item/add.html"}. > > > Jeff. > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Erlangweb-users mailing list > Erlangweb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/erlangweb-users > http://www.erlang-web.org/ -- Michal Zajda Erlang Solutions Ltd. http://www.erlang-solutions.com --------------------------------------------------- --------------------------------------------------- WE'VE CHANGED NAMES! Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD. www.erlang-solutions.com ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Erlangweb-users mailing list Erlangweb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/erlangweb-users http://www.erlang-web.org/