File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes resources location in developement environment? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "resources location in developement environment?" Watch "resources location in developement environment?" New topic
Author

resources location in developement environment?

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
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

Joined: Aug 16, 2005
Posts: 13869
    
  10

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.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830

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

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: resources location in developement environment?
 
Similar Threads
Hot Code Replace in websphere 5.1
XBRL using Java
Trouble in compiling
Modify build xml to replace words in an xml or properties file based on a text file
Apache Ant add property file and policy file