aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes mvc pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "mvc pattern" Watch "mvc pattern" New topic
Author

mvc pattern

seetarama raju
Ranch Hand

Joined: Feb 07, 2001
Posts: 104
i've doubt in the implementation pattern. according to the pet store application architecture in j2ee blueprints,jsp,javabeans
and custom tags are the core of the view.From what i understand
EJB tier comprises of the model.if in an application if we have
a single controller servlet what exactly will it do. my understanding is it will accept client forwarded from jsp,
instantiates the respective bean according to the kind of request
and gives its context along with the model's state to the javabean. the model state can be presented to the user through
the use of usebean tags is jsp. can anybody tell me whether this is correct or am i missing any crucial point.
please respond to this as i need to know this urgently.
thanks in advance.
seetarama raju
Ranch Hand

Joined: Feb 07, 2001
Posts: 104
please somebody reply to this. i need this.
thanks in advance
John Bateman
Ranch Hand

Joined: Mar 09, 2000
Posts: 320
Hi
For additional information you should look up the "Model-2" architecture.
In the mean time I'll explain. The JSP/HTML (View) layers send a request to a servlet which can dynamically instantiate an object depending on the request. (We'll call them Action classes). The action class is processed (Controller) by calling a method defined in your Action Class Interface. This process could be to lookup EJB Obects, or get information from a database (the Model) the controller then can continue performing more Functional Specifications (More Controller). The resulting information is then added to the 'HttpRequest" object and is dispatched back to another JSP (View).
This shows a very circular pattern that is quite powerful and easily to manage and add functions to.
You may also want to lookup the 'struts' product at jakarta.apache.org. This is a great example of a proper MVC architecture. (In my opinion that is)
Hope this helps.
------------------
SOURCE CODE should be SURROUNDED by "code" tags.
Click here for an example
[This message has been edited by John Bateman (edited July 06, 2001).]


SOURCE CODE should be SURROUNDED by "code" tags.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15662
    
  15

Actually, yes, you ARE missing an important point. The "useBean" tag doesn't grok EJBs - it's for traditional JavaBeans. EJBs require a naming context in order to be located/instantiated, and useBean doesn't support this.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mvc pattern
 
Similar Threads
Tag Doubt
Final mock exam question 54
restricting access to a jsp
Tags
what design Pattern to use for this problem