Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

resources location in developement environment?

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where should I place resources (xml files/properties files etc) in developement environment?

In production environment, they should go in *application*-> WEB-INF-> classes. Right?

Thanks.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15207
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can put them anywhere you want, as long as you make sure they go to the place you need them to be when you build your deployable web application.

Some tools or IDEs will force you to use a certain directory layout for your source files, others don't.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You can put them anywhere you want, as long as you make sure they go to the place you need them to be when you build your deployable web application.


Yes, Actually we don't even need to place them in developement environment, if we can directly place them in production environment at right place, because they are being used only at the time execution.

Right?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at
java.lang.String)" target="_blank" rel="nofollow">ServletContext.getResourceAsStream

It can be used to get resources relative to the root of the application.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic