File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts 2 Convention Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 Convention" Watch "Struts 2 Convention" New topic
Author

Struts 2 Convention

Neil Muya
Ranch Hand

Joined: Oct 26, 2009
Posts: 30
Hi , I'm new here in java ranch ,hope you guys can help me.

My team will be developing a struts 2 spring + hibernate using struts 2 mvc. Just wanna ask if there is a tutorial for struts 2 coding convention.

Like is it better to use annotation than xml? or using struts.xml as configuration rather than using zero configuration.

Hope you pro's can help me.

Thanks!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The things you mentioned are a matter of preference.
Neil Muya
Ranch Hand

Joined: Oct 26, 2009
Posts: 30
Maybe I was just confused about a concept i heard , that annotations are better than xml.

Because I see validation annotations being used this days instead of validation xml.

And I see examples of using the include element in struts.xml to lessen the code.

hmm maybe I was hoping for a struts 2 conventions that would make the code more readable.

Anyway maybe it really depends on the preference.

Thanks for answering dave , maybe I should experiment on both xml and annotation as well as zero configuration to see what is more readable and maintainable .



Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8843
    
    7

Neil Muya wrote:
maybe I should experiment on both xml and annotation as well as zero configuration to see what is more readable and maintainable .


I think you've answered your own question!


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 Convention
 
Similar Threads
help needed mvc using servlets, jsp and java beans
struts2 Vs spring mvc
Struts 2 - Action name works with any URL pattern
Struts Version
Is there a better Web Application (J2EE) framework that we can use?