Comment on Tutorial - MVC Architecture (Model 2 Architecture) By Baski



Comment Added by : Tayo

Comment Added at : 2010-01-03 12:53:46

Comment on Tutorial : MVC Architecture (Model 2 Architecture) By Baski
Thanks for the clear illustration of the MVC2 architecture. Could you please help me with this scenario:
1. I have a controller (servlet1) that passes some data(model) to the view (jsp1) for display.
2. On jsp1, i want to have a hyperlink to display some other view (jsp2), which a different set of data.

What is the proper approach?
a. Do i point the hyperlink (href) to another controller (servlet2) which gets the data(model) for display on jsp2
OR
b. Do i just point the hyperlink (href) directly to jsp2 and then use JSTL sql to access my data correctly? Is it proper to do this with MVC2 mindset?

If i take the approach in a., does it mean that i'll need a controller servlet for each view?

Please note that i'm trying to learn the MVC2 approach without using any framework yet.


Kindly help. Thanks


View Tutorial



Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Managing several submissions can be a lot more sim
View Tutorial          By: Curran Cline at 2012-12-18 05:43:44

2. nice one dear
View Tutorial          By: pradeep at 2010-02-15 07:00:35

3. Hi Chriz,
Yes it should work on any site. B

View Tutorial          By: William at 2010-07-10 20:54:24

4. Very new to Java and was hoping you could explain
View Tutorial          By: Confused at 2011-08-16 14:02:06

5. can we use this code in a web application. your he
View Tutorial          By: phani at 2008-09-17 06:15:26

6. Hi

Where puts this code in ror app

View Tutorial          By: martin at 2013-01-31 08:51:12

7. IT IS VERY USEFUL FOR BEGINNERS
View Tutorial          By: Adhi Rudran at 2007-04-16 02:58:47

8. someone explain how to use PreparedStatements with
View Tutorial          By: Manikprabhu at 2011-03-26 00:04:54

9. good but you don't express the programs examples
View Tutorial          By: anchal at 2010-09-29 02:40:02

10. This is so phat. Maybe the best explanation ever t
View Tutorial          By: Devin Prince III at 2010-08-11 10:01:04