Spring MVC Fast Tutorial: Model View Controller

What are we going to build?

A page displaying a car list.

We need:

  • Model classes: Car and Brand
  • Manager class: to obtain a list of Cars
  • Controller class: will use the list method from the Manager
  • View (JSP): display the car list

Model classes

'WEB-INF/src/springmvc/model/Brand.java'

package springmvc.model;
 
public class Brand {
	private Long id;
	private String name;
	private String country;
 
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
}

'WEB-INF/src/springmvc/model/Car.java'

package springmvc.model;
 
import java.math.BigDecimal;
 
public class Car {
	private Long id;
	private Brand brand;
	private String model;
	private BigDecimal price;
 
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Brand getBrand() {
		return brand;
	}
	public void setBrand(Brand brand) {
		this.brand = brand;
	}
	public String getModel() {
		return model;
	}
	public void setModel(String model) {
		this.model = model;
	}
	public BigDecimal getPrice() {
		return price;
	}
	public void setPrice(BigDecimal price) {
		this.price = price;
	}
}

Manager Class

To keep things simple, we use a static list instead of a database.

'WEB-INF/src/springmvc/service/CarManager.java'

package springmvc.service;
 
import java.math.BigDecimal;
import java.util.LinkedList;
import java.util.List;
 
import springmvc.model.Brand;
import springmvc.model.Car;
 
public class CarManager {
 
	private static List<Car> carList;
 
	static {
		Brand brand1 = new Brand();
		brand1.setId((long)1);
		brand1.setName("Mercedes");
		brand1.setCountry("Germany");		
 
		Brand brand2 = new Brand();
		brand2.setId((long)2);
		brand2.setName("Peugeot");
		brand2.setCountry("France");		
 
		Car car1 = new Car();
		car1.setId((long)1);
		car1.setBrand(brand1);
		car1.setModel("SL 500");
		car1.setPrice(new BigDecimal(40000));
 
		Car car2 = new Car();
		car2.setId((long)2);
		car2.setBrand(brand2);
		car2.setModel("607");
		car2.setPrice(new BigDecimal(35000));
 
		carList = new LinkedList<Car>();
		carList.add(car1);
		carList.add(car2);		
	}
 
	public List<Car> getCarList() {
		return carList;
	}	
}

Controller

In 'WEB-INF/springmvc-servlet.xml', we declare a new URL:

  <bean name="/list_cars.html" class="springmvc.web.CarListController"/>

We now create this Controller: 'WEB-INF/src/springmvc/web/CarListController.java'

package springmvc.web;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
 
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
 
import springmvc.service.CarManager;
 
public class CarListController implements Controller {
 
	public ModelAndView handleRequest(HttpServletRequest arg0,
			HttpServletResponse arg1) throws Exception {
 
		CarManager carManager = new CarManager();
 
		ModelAndView modelAndView = new ModelAndView("carList");
		modelAndView.addObject("carList", carManager.getCarList());
 
		return modelAndView;
	}
}

View

The view 'carList' declared above: 'jsp/carList.jsp':

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<body>
	<h1>Car List</h1>
 
	<c:forEach items="${carList}" var="car">
		${car.brand.name} ${car.model}: ${car.price}
		<br />
	</c:forEach>
 
 </body>
</html>

Result

Build (ant), relaunch Tomcat and check it's working: http://localhost:8180/springmvc/list_cars.html

Summary

Your project now looks like that:

You can download it here.

We just built a complete Spring MVC application:

  • model classes
  • service/manager class
  • controller class
  • view (JSP)

Previous: Hello World --- Up: Spring Fast Tutorial --- Next: Form Processing

 

Feedback

Hi, Nice tutorial, just one correction on this particular web page In CarListController.java From: ModelAndView modelAndView = new ModelAndView("carList"); To: ModelAndView modelAndView = new ModelAndView("car_list"); Thanks, Ted
Ted Regino
Mar 26, 2008
#1
Thank you Ted, it's fixed.
Jérôme Jaglale
May 9, 2008
#2
for learners it would be helpful a lot
varma
Oct 14, 2008
#3
Good tutorial for for begineers !!!
Harish Kumar
Nov 11, 2008
#4
Sometimes it so happens that I find tutorials targeted towards what I am exactly trying to do. Thanks much for the excellent tutorial!
vinay chilakamarri
Nov 15, 2008
#5
Thanx very good tutorial for beginners
venu
Nov 24, 2008
#6
ya really its nice, to get confidence on spring,if u see spring referencd pdf document first u ll stop learning it.thx
satish
Dec 2, 2008
#7
Very well thought out. Thanks
Anomononomonous
Jan 7, 2009
#8
simple superb..
RockStone
Jan 28, 2009
#9
Exactly what I was looking for. Concise and to the point
Rajesh
Mar 25, 2009
#10
Excellent Tutorial for the begineers
Roopesh
Apr 15, 2009
#11
Thank you,Excellent Tutorial
gopalramana
Apr 18, 2009
#12
Thank you, Its really good tutorial.
Gany
Apr 21, 2009
#13
Excelente tutorial. Mi enhorabuena ;-)
JJO
May 4, 2009
#14
Excellent tutorial! Thanks a lot

May 7, 2009
#15
Thanks a lot

May 8, 2009
#16
Wonderful Tutorial, reaally nice. It really boosted my confidence and now I m eager to learn it more and more.
Deep
May 8, 2009
#17
Awesome
Zaghman Arshad
May 15, 2009
#18
Its good tutorial for new one who does't have knowledge of spring.
Virendra Badodiya
May 20, 2009
#19
I find this best among 5 tutorials on Spring.
Aminur
Jun 2, 2009
#20
I must admit that this is to the point,gets the job done and very Very simple to understand and implement. Thanks alot Jerome
Tej Sarup
Jun 18, 2009
#21
Learning that so fast makes me feel good...

Jun 25, 2009
#22
Learning that so fast makes me feel good...

Jul 10, 2009
#23
Learning that so fast makes me feel good...

Jul 10, 2009
#24
Great tutorial.
Dean
Jul 22, 2009
#25
Hey, that's great tutorial. But i still have a problem. I want to create form page which ask name and then when submit button clicked it will display the name. I wan to use SimpleFormController and onSubmit to handle the request. But i always find error on my page. Can you help me with that? please my email otniel_itb@yahoo.com
Otniel
Jul 22, 2009
#26
Thanks a lot to you Jerome, for such a great document...
Mahesh Gopal
Jul 23, 2009
#27
Nice Tutorial
Philemon kasyoka
Aug 26, 2009
#28
ok very good
wasim
Aug 29, 2009
#29
That a great way put things in the simplest form.... Excellent tutorial ...thanks a TOn ...
sourav
Aug 29, 2009
#30
Hi, excellent tutorial for spring mvc! I believe there is a typo in this: change ModelAndView modelAndView = new ModelAndView("carList"); into ModelAndView modelAndView = new ModelAndView("list_cars"); On the whole very lucid explanation! Thank you!
bhanuprasad
Sep 3, 2009
#31
Awesome tutorial!!! - I've been reading a Spring Book for a couple days and have not been able to put together a project. With this tutorial I was able to get up to speed in less than an hour! Thanks so much for putting this together Jerome!
Phil
Sep 4, 2009
#32
Thanks, It simply explains a lot.
Muhammad Shahzad Matin
Sep 13, 2009
#33
I am a php guy and working on cakePhp I realy enjoyed the tutorial, Thanks
Raju Sharma
Sep 23, 2009
#34
hey this tutorial is the best!
rob
Sep 23, 2009
#35
you rock!!!
ana
Sep 29, 2009
#36
hey after creating carList.jsp I tried to do ant build but its showing errors. build: [javac] Compiling 5 source files to /home/rv/apache-tomcat-5.5.26/webapps/springmvc1/WEB-INF/classes [javac] /home/rv/apache-tomcat-5.5.26/webapps/springmvc1/WEB-INF/src/CarManager.java:8: error: Identifier expected. [javac] private static List carList; [javac] ^ [javac] /home/rv/apache-tomcat-5.5.26/webapps/springmvc1/WEB-INF/src/CarManager.java:8: error: Class or interface declaration expected. [javac] private static List carList; [javac] ^ [javac] 2 errors BUILD FAILED file:/home/rv/apache-tomcat-5.5.26/webapps/springmvc1/WEB-INF/build.xml:20: Compile failed; see the compiler error output for details. I guess the problem might be that ant has to compile Car.java,Brand.java and then CarManager.java and its not compiling in that order.Is it???If not how do ant know in which order classes are to be compiled?? Thanks Mac
mac
Oct 8, 2009
#37
I downloaded the zip file from the link above and removed all the class files in it and did ant build.Its showing errors.Buildfile: build.xml build: [javac] Compiling 5 source files to /home/lk/apache-tomcat-5.5.26/webapps/springcars/springmvc/WEB-INF/classes [javac] /home/lk/apache-tomcat-5.5.26/webapps/springcars/springmvc/WEB-INF/src/springmvc/service/CarManager.java:12: error: Identifier expected. [javac] private static List carList; [javac] ^ [javac] /home/lk/apache-tomcat-5.5.26/webapps/springcars/springmvc/WEB-INF/src/springmvc/service/CarManager.java:12: error: Class or interface declaration expected. [javac] private static List carList; [javac] ^ [javac] 2 errors BUILD FAILED file:/home/lk/apache-tomcat-5.5.26/webapps/springcars/springmvc/WEB-INF/build.xml:21: Compile failed; see the compiler error output for details. Total time: 0 seconds Any ideas??
raj
Oct 8, 2009
#38
Great tutorial, thanks!
Ruth
Oct 23, 2009
#39
really good one for new learners !!!
Kunal
Oct 26, 2009
#40
I started reading spring MVC from few other sites and cudnt understood.. and gosh ..this is so good, it helped me a lot. Excellent. Would like similar kind of tutorial for advanced users too from the same author..gr8 work..
parvesh sharma
Nov 12, 2009
#41
Good job. Respect!
Massimo
Nov 17, 2009
#42
just starting with Spring so far this is the best tutorial I've found that does not overwhelm me. anyone know of any other Spring tutorial that combines it with tiles?
foobar
Nov 24, 2009
#43
Hi any body can help me out. I am only getting the message of the jsp page.I am not able to read the java file.I have check the .xml. Everything is configure right.
rak
Nov 25, 2009
#44
Does anyone here know any good tutorials like these but maybe with more classes implemented and a more sofisticated GUI and controller?
nsane
Nov 27, 2009
#45
This is a very good tutorial. Please write more, you do a very good job in that they are very clear and well presented. Have you thought of writing a book like this?
Al
Dec 4, 2009
#46
OMG this is very straight forward. Thank you very much, of all these years finally I got a grip on what Spring is all about. Thanks again keep it up
John199
Dec 4, 2009
#47
Gracias Good Tutorial
xcom
Dec 29, 2009
#48
Finally an easy-to-understand post. :)
andrew
Feb 1, 2010
#49
clear cut, easy to learn and configure spring tutorial
sreekanth
Feb 9, 2010
#50
Can anyone tell me how to run this under netbeans after you download the zip file. Thanks in advance

jj
Jones J
Feb 10, 2010
#51
Awesome.

Exactly what I needed since I'm a beginner using the Spring MVC framework.
Duffman
Feb 23, 2010
#52
Thanks very much. Great tutorial
David
Mar 6, 2010
#53
Thanks a lot,easy to understand.
sri
Mar 11, 2010
#54
hi its very easy to understand your tutorials. Very very thanks a lot.
kannan
Mar 14, 2010
#55
Best beginner Spring tutorial out there. Exactly what I was looking for.
Thank you so much.
Brian
Apr 14, 2010
#56
Agree with the comments above. Clear and concise.
Thank You!
walkerj
Apr 20, 2010
#57
great tutorial even 2 years later
Jon
May 4, 2010
#58
great
kennytai
May 6, 2010
#59
thanks
lov0u
May 12, 2010
#60
thanks
guest
May 13, 2010
#61
great, thank u :)

May 14, 2010
#62
Hi,
Its really a nice tutorial .I learned alot from this .

I have one problem that i got output as
${car.brand.name} ${car.model}: ${car.price}
instead of actual values .I have already set jstl.jar as my class path .
Can anyone please let me know what is the issue .
Nomi
May 21, 2010
#63
This is really Gr8
Nomi
May 25, 2010
#64
Good tutor, thanks
Dimaseg
Jun 2, 2010
#65
Great !! really solved my problems. Bravo.

Muhammad Umair
Jun 2, 2010
#66
Excellent tutorial. Simple and concise.
Mark915
Jun 8, 2010
#67
thnku so much dude
anil
Jun 17, 2010
#68
VERY nice :D
thx, realy thx dude
z
Jun 23, 2010
#69
hi it is very easy to understd and it brings the confidence on the spring mvc framework
mak
Jul 6, 2010
#70
A simple tutorial
Ramachandran S
Jul 13, 2010
#71
Thank you very much for this. Fantastic help!
Jimmie
Jul 14, 2010
#72
Simeple and good tutorial
superb..........
Thanks
Mahesh
Jul 22, 2010
#73
Merci
constantin
Jul 27, 2010
#74
Building my first Spring MVC app and this tutorial is EXACTLY what I was looking for. Thank you very much.
Beginner@SpringMVC
Aug 9, 2010
#75
Just Grade Tutorial, thank you for your time
rookie
Aug 12, 2010
#76
good simple tutorial..plz do keep post most important concepts in simpler way like this.
thank you
Koushik
Aug 31, 2010
#77
Short and sweet example... So nice...
Nuwan
Sep 4, 2010
#78
in the download zip you have a BrandManager.class
Where did that come from?
Mike
Sep 6, 2010
#79
also you have to change the .jsp file to list_cars.jsp other than that good tutorial.
Thanks
Mike
Sep 6, 2010
#80
Very nice tutorial. It makes things look simpler and we get confidence to move forward.
Ruchi
Sep 21, 2010
#81
good tutorial
krunal patel
Sep 22, 2010
#82
Simple and concise..got it to run on first try!!
Neal
Sep 24, 2010
#83
Good one. Please add mysql to this to retrieve data from db. Thnxin advance :^)
dhantu Sri
Oct 8, 2010
#84
Good one..! Can I also get a reference on how to internationalize my project, like adding references in springmvc-servlet.xml and also location of those .properties files.

Thanks in advance....! :-)
Akshay!
Oct 18, 2010
#85
thanks..nice tutorial
Patil
Oct 26, 2010
#86
Short and sweet...
Bala
Oct 28, 2010
#87
really helpful tutorial for beginners
rookie
Nov 4, 2010
#88
hmmm...
joe
Nov 6, 2010
#89
Great tutorial.

Thanks,
Saurabh
Saurabh
Nov 15, 2010
#90
HI guys,

i am getting a blank page
Rudzani
Dec 15, 2010
#91
Dude, I'm having the same problem:
${car.brand.name} ${car.model}: ${car.price}
and nobody answered it.
I downloaded the zip and did all the steps carefully but still...
me
Dec 24, 2010
#92
how to deverloper spring in eclip? thanks every body
TuanTH
Dec 28, 2010
#93
It's really a great tutorial, but I'm stuck on building the view. I'm using Eclipse, Tomcat 6.0.29 typing in *. jsp "<% @ taglib prefix ="c "uri =" http://java.sun.com/jsp/jstl/core "%>" get the error "can not find the tag library descriptor for java.sun.com jsp http JSTL core ", a lot of time spent searching for a solution, most often the cause of what it claims to be the is incorrect version given in web.xml. For me it worked just adding JSTL-1.2.jar file to the library project.
That's the link to that file http://www.java2s.com/Code/Jar/STUVWXYZ/Downloadjstl12jar.htm .Maybe this will help someone.
kk
Dec 28, 2010
#94
Gud example....
Please post same example with MultiActionController anybody....
Thanking in advance.
Sudhir Verma
Jan 13, 2011
#95
Estou seguindo os seus exemplos e estou compreendendo muito bem o funcionamento do SpringMVC. Parabéns!!!
Rodrigo S
Jan 20, 2011
#96
Ohhhho...,Great Really Great,

All The Best..in Feature
Sudarshan M
Feb 2, 2011
#97
Good tutorial for beginner. Easy flow and organization.

Thanks.
kurinchiblogger
Feb 12, 2011
#98
Understandable...
Thanks
Mihira
Feb 25, 2011
#99
Excellent Tutorial!

Mar 6, 2011
#100
Good one .. !!
Ashok kumar K
Mar 8, 2011
#101
Very nice and easy to understand for beginers

Thanks a lot..
Shyju Karayi
Mar 10, 2011
#102
gud 1
Arun
Mar 17, 2011
#103
ghj
ghj
Mar 17, 2011
#104
excellent tutorial...
reddy
Mar 24, 2011
#105
cool
Sumit
Mar 25, 2011
#106
When you write ${car.brand.name} on the Jsp, how does it recognise that It needs to retrieve the Car's brand object's name property.Please explain.
Sunny Gupta
Apr 7, 2011
#107
Thanks lot for this tutorial.

I would appreciate if you can put a tutorial with mysql database, I like the way you explain the things.

Thanks again.
Majid
Apr 8, 2011
#108
Rocked my world! Thank you!!
Skurpi
Apr 11, 2011
#109
Dont you think that this tutorial is confusing ?
Where did you show the connection between the carList.jsp and
list_cars.html

myforum
Apr 24, 2011
#110
Looks simple but superb
shanmuk
Apr 26, 2011
#111
million thanks for you ...!!! very useful and simple tutorial
ElkHorn
May 16, 2011
#112
Excellent simple example, thank you.

To answer Sunny Gupta's question if you haven't done so already: "When you write ${car.brand.name} on the Jsp, how does it recognise that It needs to retrieve the Car's brand object's name property.Please explain."

The object name "car", comes from the loop variable (which references the "carList" object - passed as a view object in the CarListController class by this line: modelAndView.addObject("carList", carManager.getCarList());

So, the "carList" string is the name of the linked list object from the CarManager.java class, the variable "brand" references the Brand.java class (I don't properly understand this part), and the variable "name" calls the getName method of the Brand.java class.

It takes a bit to get one's head around, but I think this is roughly how it works, someone can correct me if I'm wrong.
Geofrey Rainey
May 17, 2011
#113
"myforum" said: "Dont you think that this tutorial is confusing ?
Where did you show the connection between the carList.jsp and
list_cars.html"

That's defined in the springmvc-servlet.xml file:

<bean name="/list_cars.html" class="springmvc.web.CarListController"/>

Geofrey Rainey
May 17, 2011
#114
hi

Can you please tell me if these tutorials can be run without that shitty ant...I dont want any build tools here. can it be run that way?

Please let me know at mayankkalbhor@gmail.com

Thank you and i had a bad day as i was unable to complete any tutorial given on this website.

Bye
Mayank
May 27, 2011
#115
Very great tutorial. People who are busy on Spring must read this. Good done Jerome!
Wim
Jun 1, 2011
#116
I am going to try it as well
MN
Jun 3, 2011
#117
Great tutorial.Thnx!!!!!
Thushan
Jun 4, 2011
#118
awesome tutorials

Jun 6, 2011
#119
nice one
veerendra
Jun 17, 2011
#120
good one.. thanks
arif
Jun 21, 2011
#121
fine

Jun 21, 2011
#122
Oho nice example yaar,
Very easy one
Vinay@Gani
Jun 21, 2011
#123
simple one
Vinay Dhori
Jun 21, 2011
#124
Its really a Good Tutorial for beginners
:)
Jun 28, 2011
#125
ya this tutorial is confusing. can anybody please answer.
avg
Jun 29, 2011
#126
Superb!!!

Jul 15, 2011
#127
Here We Speak Spanish!!
Gracias por el tutorial,
No sabía nada del tema, pero ahora comprendo muchas cosas!!!
Juanma
Jul 19, 2011
#128
Thanks for providing wonderful oppurtunity with spring MVC tutorial. Really nice.......
Ramalingam
Jul 27, 2011
#129
"BigDecimal price"? What kind of cars are you selling? :-O
Daniel
Jul 27, 2011
#130
Thanks a lot......
RUB
Aug 5, 2011
#131
thanks! it worked properly. i used STS, and added it as a package and not from WEB-INF. but it still worked!
leon
Aug 5, 2011
#132
HI.. while running above code it shows The requested resource (/EG/List_cars.html) is not available. pls anyone help me to know about the error
Mekala
Aug 8, 2011
#133
for the issue that lots of people mentioned above please refer this link...

http://www.mkyong.com/spring-mvc/modelandviews-model-value-is-not-displayed-in-jsp-via-el/
Rock
Aug 9, 2011
#134
Thanks very helpful
Sid
Aug 19, 2011
#135
Is anyone else having trouble getting the list to show up in the JSP? What did you do?
Frank
Aug 22, 2011
#136
gud tutorial... :)
priya
Aug 26, 2011
#137
Thanks man
Hossein Boka
Aug 28, 2011
#138
Excellent tutorial
Kavin
Sep 1, 2011
#139
very nice
Madhu Kathir
Sep 1, 2011
#140
Excellent tutorial for beginners!!
karthika
Sep 7, 2011
#141
Kudos....very nice
MM
Sep 16, 2011
#142
very good for mvc design pattern tutorial
Riaydh
Sep 28, 2011
#143
Thanks..
kavitha
Sep 29, 2011
#144
Awesome, thank you very much
Sanjay
Sep 30, 2011
#145
It's very small tutorial for Spring MVC beginners ... arch flow is clear with simple example .. thanks
Vijay Jothangiya
Oct 3, 2011
#146
Its very usefull for beginners...
Thankq you so much
Veeresh Puchakayala
Oct 7, 2011
#147
Its very usefull for beginners...
Thank you so much
Veeresh Puchakayala
Oct 7, 2011
#148
thanks you very much
JKM
Oct 7, 2011
#149
oh nice thanks a lot :)

Oct 11, 2011
#150
Thank you very very very much. . . .This helped me a loooooooooooot
Thanks Bro
jr
Oct 12, 2011
#151
Nice
venkat
Oct 19, 2011
#152
Very Helpful...........Thnx alot........Gud work :)

Oct 21, 2011
#153
simply great
raj
Oct 24, 2011
#154
Good for beginners
yadav
Oct 28, 2011
#155
Hi All,
How to assign ${car.brand.name} value to local jsp variable


Thanks in Advance
Anil
Oct 29, 2011
#156
After loading the project, I run ant, with build successful. But when I go to the URL (apache is up and running) I get 404 error.
Any idea?
Elad
Nov 1, 2011
#157
really useful............
YuZi
Nov 2, 2011
#158
It's good Example
SLS
Nov 10, 2011
#159
good come up with more examples about spring transaction
shashi
Dec 2, 2011
#160
Nice one...!!!!Thanku very much
rabin
Dec 14, 2011
#161
appreciating the simplicity
Nic
Dec 15, 2011
#162
thanxxx a lot...i got some idea
rakhee
Dec 23, 2011
#163
Hi Can you please let me know how to edit the carlist
sree
Dec 26, 2011
#164
thanx , its a very good tutorila
shiva
Dec 29, 2011
#165
it is too good thank you so much for this as it is really too helpful

Jan 7, 2012
#166
I got a good way to develop a Spring based project, Thanx
Hari Ji Srivastav
Jan 12, 2012
#167
GREAT TUTORIAL
Lidia
Jan 12, 2012
#168
Yes, its good for beginner
Dhiraj Kumar
Jan 23, 2012
#169
Please provide a facility of downloading the tutorial...
sai suresh
Jan 31, 2012
#170
as a beginner it is very helpful to me
nicky
Feb 7, 2012
#171
dear Jerome,

You are awesome and you saved my ass.

regards,
-a
arai
Feb 12, 2012
#172
gud,its good for beginner
siva nadavati
Feb 19, 2012
#173
Hi this is vijay from India-Chennai, really superv tutorial. i have one doubt, in "CarListController.java" will come "carList" or "list_cars".????
Hi this is vijay from India-Chennai
Feb 24, 2012
#174
Its Best Examples for Beginner
Do Well
Sudhir Nayak (JBoss)
Mar 21, 2012
#175
Best Example keep it up
Panks
Mar 22, 2012
#176
It's good one for starting and it's full mvc architecture.
Ashish from india pune
Mar 24, 2012
#177
Its good tutorial for beginners.
Mahesh
Apr 3, 2012
#178
awesome thank you so much:)
vidz
Apr 5, 2012
#179
If I try and follow your pattern in the jsp I get runtime errors that the tag doesn't support expressions.

"According to TLD or attribute directive in tag file, attribute items does not accept any expressions"

the ${} syntax is causing this problem. How do I make ${} supported in my jsp?
David
Apr 17, 2012
#180
Really nice and to the point. Allowed me to learn what probably would've taken me a couple of hours on other sites. Thanks!
Ryan
Apr 30, 2012
#181
when try to loungtch - have error

Fixed method:
In controller CarListController.java
1.Add:import org.springframework.web.servlet.mvc.Controller;
2.Replace:
public class CarListController {
public ModelAndView handleRequest(...
On
public class CarListController implements Controller{
@Override
public ModelAndView handleRequest(...
seedling
May 8, 2012
#182
Still getting Hi in the tomcat. How do you deploy the downloaded project springmvc? Thanks in anticipation.

May 27, 2012
#183
Good POC for beginners, please let me how to deployee in the
WID IDE development environment
Lovelesh Singh J
Jun 14, 2012
#184
Http -404 Error ,Jsp page not found


Solution

Try to keep all the Jsp pages in web module insted of keeping
in the WEB-INF or META-INF folder or else in the root directory under Webcontent
Lovelesh Singh J
Jun 14, 2012
#185
its good tutorial
srinu
Jun 20, 2012
#186
Thank you so much

Aug 7, 2012
#187
Superb tutorial for beginners.....
Nishar
Aug 8, 2012
#188
Thank You So Much ...........
Utsav
Aug 16, 2012
#189
thank you! i am from china.
fengxiao
Aug 28, 2012
#190
Thanks u ..
pintu
Sep 10, 2012
#191
Nice Tutorial, I guess I am ready for a job in SpringMVC.. Thank you so much.
Sree_Ramesh
Oct 19, 2012
#192
Excellent tutorial..
every other Spring tutorial on the Internet jump straight into the dependency injection concept frightening developers.
Your tutorial gives a good transition from plain old jsp-servlet development to using spring.
thanks a lot friend!
Manoj Kumar.A (http://getch.wordpress.com)
Nov 12, 2012
#193
thanks u
Rafal Poland
Nov 29, 2012
#194
yeah a good tutorial!
Prashant
Dec 26, 2012
#195
thanks for making me to understand the spring concept very easily.
RAMYA
Feb 6, 2013
#196
Found exactly whatever i was looking for. Thanks a lot..!
Vishwas
Feb 13, 2013
#197
Great stuff keep it up budd!
Pach
Mar 6, 2013
#198
@foobar, an example code with downloadable can be seen at <a href="http://www.javaexperience.com/using-tiles-with-spring-mvc/">Using tiles with Spring MVC</a>
Sandeep
Mar 7, 2013
#199
Bhai bahut accha tutorial hai.....maza aa gaya. 'Web.xml' missed out hai thats why it was not working,but thats not an issue, overall good job, Thanks! aur kisi ki samjh me nahi aaya ho aur kuch problem hai then he can ask me instead of blaming this guy. 'tribhuvanorama@gmail.com'
Tribhuvan Sharma
Apr 11, 2013
#200
It is Really useful to me.

Thank You very much..........


Thanks,
Saravanan.
Saravanan
Apr 17, 2013
#201
thanks for the tutorial
balakrishna depani
Apr 28, 2013
#202
Thanks...
Lakshmi Reddy Dandela
May 2, 2013
#203
Really Good :)
Amila
May 2, 2013
#204
All these years since it was first published, and this tutorial is still fantastic. thanks so much!
jasonR
May 20, 2013
#205
The best tutorial I found .. It was very good ..
Richard
May 22, 2013
#206
Thanks a Lot. It helped.very good.
Shrikant
Jun 1, 2013
#207

This is awesome!! really helpful for me. Thanks for sharing with us. Following links also helped me to complete my task.

http://msdn.microsoft.com/en-us/library/ff649643.aspx

http://www.mindstick.com/Articles/766f2296-83d4-4b13-9d55-6ce91e9d2a59/?MVC Model View Controller
Royce Roy
Jun 6, 2013
#208
very good tutorial
Alam
Jun 12, 2013
#209
very nice excellent tutorial
kiran
Jun 19, 2013
#210
Excellent tutorial for beginners like me. Thanks from Turkey :D
As?m
Jun 28, 2013
#211
Thanks!
Nice tutorial.
Dipesh
Aug 10, 2013
#212
Really nice....
Basavaraj
Dec 4, 2013
#213
Thank you, nice and "to the point" tutorial.
Tibi
Dec 5, 2013
#214
thanks...
km subhan
Dec 7, 2013
#215
Fantastic tutorial. It is really helping solidify the concepts of spring,and its web framework
dreamer
Jan 23, 2014
#216