Tuesday, November 29, 2011

Suppose there are 15 links on the homepage of a site and each link creates a new request, how your servlet controller would handle it? (Assuming you are using MVC-2)

Can we do one thing,that for all those 15 links(call them action)we can have different action ids,now on click of those links we will submit a unique action id related to that particular action and in servlet controller we will make different switch cases based on action id(received) from view(jsp,js) and in turn these case statements will comprise of methods that will go for further actions in model layer (delegate,ejbs,dao,etc. and then to DB and a return jouney)
Category:Servlet Interview Questions

No comments:

Post a Comment