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 Config files and the project' (directory) structure 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 "Config files and the project Watch "Config files and the project New topic
Author

Config files and the project' (directory) structure

Vijaya Ragavan
Greenhorn

Joined: Dec 02, 2013
Posts: 25
Hi all,

I developed a basic struts2 app in MyEclipse in which the directory structure is not the same as said in many tutorials and it didn't have a WEB-INF/Classes folder. Also it doesn't have
Struts-config.xml
default.properties, etc. It only has Struts.xml and web.xml files. But it works fine.

So my doubts are:
1. Is there no strict rule on the directory structure of the project?
2. Which Configuration files are optional?

Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8843
    
    7

Vijaya Ragavan wrote:
1. Is there no strict rule on the directory structure of the project?

Yes and no. So long as the config files make it into the root of the classpath the app will work. That said, there are best practices for creating web applications.

Vijaya Ragavan wrote:
2. Which Configuration files are optional?

None to my knowledge. Struts-config.xml and default.properties were used in Struts 1.x and are not used in Struts 2.x. see here


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Vijaya Ragavan
Greenhorn

Joined: Dec 02, 2013
Posts: 25
Hi Joe,

When i develop struts2 application in eclipse without any plugins by adding the required libraries, it didn't run. I noted in the log that it was asking for STRUTS-CONFIG.XML file. Got confused.

BTW, Is there any plugins for eclipse to develop struts2 applications?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8843
    
    7

Vijaya Ragavan wrote:
BTW, Is there any plugins for eclipse to develop struts2 applications?


I don't know. I use a text editor to configure Struts apps.
 
jQuery in Action, 2nd edition
 
subject: Config files and the project' (directory) structure
 
Similar Threads
deploying and ear as an exploded directory
Updated my Eclipse with HibernateSynchrnoizer
Where Do I Place My Resource Files So Eclipse Will Include Them in the Jar?
Trying to put property and index file into repository in Eclipse SVN.
Importing an Existing Web Application in MyEclipse