• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

source java and content directory difference in RAD

 
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

My friend setting up one of web project(say xyz) in RAD. He set up
source java within
src/main/java
content directory within
src/main/webapp

what is the difference between these two directories. Why we have to provide these two directorires. Any links, ideasmresources, sample code highly appreciated. Thanks in advance.
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't quote sources or what not, I can describe why I set up my apps the same way though (I don't use RAD)...

It is all about separation of concerns and making it easy to package. The Java files go to src/main/java. Anything in there are packages, and I will compile the whole bunch into another directory, probably something like bin/main/classes/.

Anything in src/main/webapp is the application content - what becomes visible to the user. It doesn't get compiled. When I am packing things, it would get moved to bin/main/webapp.

Then, when I build the WAR for deployment, I can put the content of bin/main/webapp directly into the WAR's main directory and can copy the contents of bin/main/classes into the WAR's WEB-INF/classes directory.

Each goes into a predictable place based on their original directory structure. It makes automating the task a lot easier.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like a typical Maven directory layout.

One's for Java source, the other is for the webapp files--not sure what the issue is.
 
Mathew Lee
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for responses. Correct. It is all maven structure only. Please advise more on these structures with refernce to maven
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
 
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Too difficult a question for us beginners. Moving thread.
 
reply
    Bookmark Topic Watch Topic
  • New Topic