Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Config files and the project' (directory) structure

 
Vijaya Ragavan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9279
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Vijaya Ragavan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9279
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic