File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Implementing the Spring MVC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Implementing the Spring MVC" Watch "Implementing the Spring MVC" New topic
Author

Implementing the Spring MVC

Priety Sharma
Ranch Hand

Joined: Jun 10, 2008
Posts: 156

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.


Priety.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Priety Sharma
Ranch Hand

Joined: Jun 10, 2008
Posts: 156

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

Joined: Feb 05, 2001
Posts: 17249
    
    6

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

Joined: Jun 10, 2008
Posts: 156

Hi Mark,

Thanks again for the inputs.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Implementing the Spring MVC
 
Similar Threads
New to Spring and Hibernate
Springļæ½s ROI
Text file file reader in real time
Spring book recomandation
[Spring Web Flow 2] Can Spring Web Flow work with Spring Web MVC?