Skip to Content
author's profile photo Former Member
Former Member

Use properties files within EAR

Hi all,

I´m developing an Enterprise Application using J2EE Developer Studio. Everything works fine, I create the WAR containing the servlet and the JAR containing the EJBs, put them together and deploy the EAR without errors.

The only problem is that my app requires the use of some properties files that should be visible both to the servlet and the EJBs. So I created a /config folder containing those files, and placed it in the EAR root folder, but I didn't manage to add it to the generated EAR file. My config folder doesn't even show in the J2EE Explorer view.

So the question is how do I add the config folder to the EAR file? (This is something I did more than once when developing in Eclipse + JBoss and always worked fine).

I also tied deploying the app with the J2EE Deploy Tool, but I had the same problem. I´m probably missing something.

Thanks in advance for any ideas.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 24, 2005 at 10:11 AM

    As work around U can add two env-entries in both the WAR en de JAR

    this works fine for me

    <env-entry>

    <env-entry-name>CONFIGURATION_FILE</env-entry-name>

    <env-entry-value><![CDATA[/project.properties]]></env-entry-value>

    <env-entry-type>java.lang.String</env-entry-type>

    </env-entry>

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.