This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
A request is made with a request parameter that has the unique id of the person whose information is to be displayed. A controller servlet, let's name it FetchPersonInfoAction, is activated. It delegates a call to some model code that, given the id value, fetches the data. The data is returned, by the model code, in a JavaBean that abstracts the collection of information for that user. Such a bean is often called a 'value object'.

The servlet places this bean in request scope as a scoped variable (via the setAttribute method) named "person", and forwards to the JSP page.

The JSP page, using the JSTl and EL, references the "person" scoped variable to display the information on the page.
[ August 16, 2005: Message edited by: Bear Bibeault ]
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably checking out one of the many MVC frameworks and actually writing an app in one of them would help? I would suggest using Struts since it is easy to grasp and brings out the concept very well.
Bear Bibeault
Author and ninkuma
Posts: 66425
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry to disagree with Neeraj, but I highly recommend not adopting a framework (particularly Struts) until one understands the mechanics of a web application. Such frameworks insulate the user from the actual mechanics and retard the understanding of these mechanics, in my opinion.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!