Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementing the Spring MVC

 
Priety Sharma
Ranch Hand
Posts: 156
Android Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to know what are the 3 different ways to implement Spring MVC?

I tried to read it in the Spring in Action book but could not find it there.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Priety Sharma wrote:I want to know what are the 3 different ways to implement Spring MVC?

I tried to read it in the Spring in Action book but could not find it there.


Was this one of your interview questions?

Against my better judgement here is an answer

1) Have your Controller implement one of the Controller interfaces (Very Old Style)
2) XML mapping of your requests to Controllers
3) Annotations in your Controller.

That is the short quick answer.

Mark
 
Priety Sharma
Ranch Hand
Posts: 156
Android Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,

Yes it was an interview question.
Thanks for the answer.

Isnt the annotations or xml configuration approach true for Struts too?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Priety Sharma wrote:Hi Mark,

Yes it was an interview question.
Thanks for the answer.

Isnt the annotations or xml configuration approach true for Struts too?


Depends on the version of Struts you are using. 1.x version only had xml, as far as I ever knew. I am sure Struts 2.x has Annotations and xml.

Mark
 
Priety Sharma
Ranch Hand
Posts: 156
Android Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,

Thanks again for the inputs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic