• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jsp & beans  RSS feed

 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have an application that uses jsp to support a user interface in oreder to query a database. I dont know if it is better to use beans or servlet to do so.
can any one help? I would like to know if there are some good examples that may help. any web links will be appreciated.
Regards,
mac.
 
Dharmesh Chheda
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Jimi
Well if you are using JSP as your view page from where you will take the input from the user .. dont let the JSP access the bean directly ..i mean set the bean properties.
a much more preffered architecture is the MVC architecture where in you get all the values entered in a servlet, let the servlet instantiate the bean do the necessary processing and then finally pass the control back to some JSP page which will print the output using the beans getter methods..
in this way your beans will be MODELS, JSP will be VIEW and servlets will be the CONTROLLERS...
i hope you got your solution
------------------
IBM Certified WebSphere Application Server V3.5 Specialist
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!