Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2011
    Posts
    36
    Rep Power
    0

    Default STRUTS 2 project folder hierarchy

    Hi all,
    I'd like to know what folder hierarchy you use on your STRUTS2 projects. I've been looking at tutorials and each author uses a different folder hierarchy. I've been using this one for my projects (Eclipse as IDE):

    <Project_Name>
    |->JAX-WS Web Services
    |->Deployment Descriptor: Message Resource_Struts2_Ant
    |->Java Resources
    | |->src
    | | |->struts.xml
    | |->Libraries
    |->build
    |->dist
    |->WebContent
    | |->META-INF
    | |->WEB-INF
    | | |->classes
    | | |->lib
    | | |->web.xml
    | |->index.jsp
    |->build.properties
    |->build.xml

    as you can see I've put struts.xml file in src directory, but I've seen examples where people put it inside classes directory. I'd like to know which one should I use to follow best practices.

    Thank you for reading,
    bapj
    There is not knowledge that it is not power!
    buyapentiumjerk.blogspot.com

  2. #2
    foo123 is offline Member
    Join Date
    May 2011
    Posts
    10
    Rep Power
    0

    Default Struts folder structure

    i'm developing small-2-medium j2ee apps with struts 1 and 2
    spring and hibernate among others.
    Well the answer to your question about struts folder structure depends on what version of struts u r using.

    Generally struts.xml goes to classes folder but this is for war archives
    when developing (eg in eclipse) you put struts.xml to src folder which will be
    copied to classes as all your java classes in src fiolder after compilation of project.
    This is for struts 2
    In struts 1 the struts-config.xml goes together with web.xml in WEB-INF root folder..

    I hope this answers your question.

  3. #3
    Join Date
    Apr 2011
    Posts
    36
    Rep Power
    0

    Default

    Hi foo123,

    Struts for me now is on hold, I'm trying to learn as much as possible about EJBs, JSF and J2EE in general.
    Thank you for your answer.
    There is not knowledge that it is not power!
    buyapentiumjerk.blogspot.com

  4. #4
    foo123 is offline Member
    Join Date
    May 2011
    Posts
    10
    Rep Power
    0

    Default Struts and i2ee

    studying the j2ee foundation is a must.
    The struts framework is very important in the java world (maybe second to spring framework or together) so i suggest you round up your knowledge of it too.

Similar Threads

  1. How to Add Poratl Project Folder to Eclipse ?
    By gb.rashu in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 08-07-2010, 08:34 AM
  2. Hierarchy in Project
    By efozdel in forum New To Java
    Replies: 4
    Last Post: 07-23-2010, 09:49 AM
  3. How to create an access folder for a project in the Jboss server
    By satya kishore in forum Web Frameworks
    Replies: 0
    Last Post: 02-09-2009, 12:31 PM
  4. Can we Add lib folder insdie Project JAR file ?
    By mahendra.athneria in forum AWT / Swing
    Replies: 1
    Last Post: 01-30-2009, 05:51 PM
  5. Replies: 0
    Last Post: 07-18-2008, 09:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •