Servlet is for forms. JSP is for out put html, Java Beans is for database interaction. ... how do they interact with each other? A lot of folks will design their web applications following the Model-View-Controller (MVC)
pattern, sometimes referred to as Model 2, or MVC 2.
Rather than regurgitate what others have said many times on the subject, let me point you to two pages on the original wiki,
ModelViewController and
MvcInJspModelTwoArchitecture. Also, a quick search on this forum will likely nab a good explanation or two. Note that the search page link is at the top right of this page.
Good luck, and of course if you have further questions on the subject, don't hesitate to ask. Though, keep in mind that we prefer that most design-based questions be held in
the OO, Patterns, UML and Refactoring forum.