Hi All,

I am working in web application using tapestry framework. I have following pages a,b,c,d and Index in my application. In Index page, check some condition and redirect to a particular page. My code,

|if(null!=cookieVal){if(cookieVal.equalsIgnoreCase("a")){returnA.class;}elseif(cookieVal.equalsIgnoreCase("b")){returnB.class;}elseif(cookieVal.equalsIgnoreCase("c")){returnC.class;}elseif(cookieVal.equalsIgnoreCase("d")){returnD.class;}}|

Here conditions are increased if pages are increased. How can I optimize this condition check and redirect to particular page.

--
Best Regards,
Anbazhagan.G

Reply via email to