TCLUG Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JSP, Bean and Servlet



Read an interesting article in JavaPro about Presentation, Model and
Controller design pattern (think this is it, left the mag at home).

Anyways, it talks about using JSP as the presenation, a Java Bean as Model and
Servlet's as the controller.

JSP's get their info from the Bean for display on the web.

Servlet's manipulate the info on the Bean.

The Bean just sits there and holds the data. :-)

I understand the JSP can POST/GET to the servlet, that communication channel is
clear.

I also understand how JSP can retrieve data from the Bean. The Bean is
instantiated inside the JSP, so that is simple.

What I don't understand is how does the Servlet communicate with the Bean?

-- 
Bob Tanner <tanner@real-time.com>       | Phone : (612)943-8700
http://www.mn-linux.org                 | Fax   : (612)943-8500
Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9