Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

MVC

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
In MVC...
Controller is going to process the logic by calling EJB Or Bean...
Moreover a controller can have subcontroller(i studied in an article ???)..Then controler redirects the request to jsp pages..
Jsp pages going to retrive data from bean for displaying ..
Here what is the role of Taglib(userdefinded tags)..can taglib contain buisness logics...
If so huv servlet will process it..
controller----->(bean,ejb)
| |

|
jsppage<---------(bean,ejb)
In MVC
1)what is the role of Taglib
2)Actually what Model is going to contain(bean,EJB)if so who process it
Help Pls
priya shankar
 
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The main purpose of Taglib is to hide the complex operation involving scriptlets. For e.g. there could be a JSP page which displays a list of employees in an organization. We can have a tag for this pupose rather than writing a scriptlet which is not modular and reusable.
The web page devloper may not be knowing java and jsp tags help in hiding java.
Model refers to data ans business logic in the application. For e.g. enities such as Employee
Here is a link on MVC
http://java.sun.com/blueprints/patterns/MVC-detailed.html
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks
I like to know who is going to process Model(contoller or View)...
1)Are there any situation when a view(jsp) calls a model
2)Huv a Taglib communicates with javaBean and in what situation
3)Huv Jsp(view) is going to retrive data from ejb(model)to display
Help Pls
priya shankar
 
Pradeep bhatt
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



1)Are there any situation when a view(jsp) calls a model


It is responsilbilty of the controller to call the model. The main purpose of MVC is loose coupling between various components.

2)Huv a Taglib communicates with javaBean and in what situation
It is possible to write custom tag handler classes that can access the javbeans. The taghandler classes have full access to JSP environment and so can access java beans stored in various scope(page,session,application,request). Please visit Sun's site for a tutorial on JSP.
The taglib access beans whenever they need data. For .e.g an Employee bean can contain emp data, so you taglib will invoke the getter methods to retrieve data.

3)Huv Jsp(view) is going to retrive data from ejb(model)to display
Through the controller. The returned from the model is stored by the controller as a java bean in the appropriate scope which are then used by JSP by javabean or custom tags.
[/QB]
 
"Don't believe every tiny ad you see on the internet. But this one is rock solid." - George Washington
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic