cancel
Showing results for 
Search instead for 
Did you mean: 

Use properties files within EAR

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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>