On Tue, Mar 11, 2014 at 3:29 AM, saurabh narayan singh < cenasaur...@gmail.com> wrote:
> I have a restlet in which i want to chain a validator and filter one after > the other in the code. The code goes something like this > > @Override > public synchronized Restlet createInboundRoot() > { > Router router = new Router(); > Validator val = new ParameterValidator(getContext()); > > Filter fil = new MYFilter(getContext()); > router.attach("/HelloWorld", HW.class); > fil.setNext(val); > val.setNext(router); > val.validate("Name",true,"^[a-z0-9A-Z]+$"); > return val; * // Why not the following line instead?* * // return fil;* > } > but this doesn't checks in the filter, just works on the validator and > then comes out. > What happens if you return fil instead of val in the code above? As it stands, you're leaving the filter out. --tim ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3074372