Adobe Interview Question
Basically this is the difference:
JSPs - are used for the view or presentation of the application.
JavaBeans - are used for the logic/business processing in the application.
You can divide up which object does which logic depending on the architecture of the project. i.e. - you can do some java processing in the JSP itself but you can choose to do the same logic in the javabeans.
JSPs are used for presentation layer as embedding html in servlets is error-prone and less readable.
- Sudheer March 14, 2010Java Beans can be used for various purposes. Some of them are for Transfer Object pattern and they are easy to get properties of a java bean object using EL, etc.