Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can i use tag library within mvc architecture?

 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello

in some tag libraris such as jakarta tag library and jrun tag library,there is database
access tag, it provide convenient function to access database from jsp page,but i wonder how can i use such a tag within MVC architecture.
as we know,in MVC architecture,all requests from the jsp pages are submit to the controller servlet,then the controller manipulate ejb to access database,it don't allow the database access from the jsp page.

who can tell me how can i combine the tag library with mvc architecture appropriately?
thank you!
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMHO, you don't. Database access tag libraries that encourage you to mix model and view are incompatible with the MVC design pattern.
Kyle
 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
i think most web program use mvc architecture,but when i use such a tag?
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by zb cong:
thanks
i think most web program use mvc architecture,but when i use such a tag?

Never.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic