jQuery in Action, 2nd edition*
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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: 8877
    
    8

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: 8877
    
    8

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Config files and the project' (directory) structure