[jboss-user] [Beginner's Corner] - Re: reading application startup files in JBoss 4 vs 5

jaikiran pai do-not-reply at jboss.com
Wed Sep 29 07:12:29 EDT 2010

jaikiran pai [http://community.jboss.org/people/jaikiran] created the discussion

"Re: reading application startup files in JBoss 4 vs 5"

To view the discussion, visit: http://community.jboss.org/message/563908#563908

Please post the entire exception stacktrace? And how exactly are you reading that file? Using java.io.File? Instead for JavaEE applications, it's better to use the following code:

String startupFileName=...// get the file name from ENC
InputStream is = this.getClass().getClassLoader().getResourceAsStream(startupFileName);

The resource will then be looked within the classpath of the application. So you can either package that myserver.properties within your app or place it in JBOSS_HOME/server/servername/conf folder (which by default is available in classpath).

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100929/71a1f1a3/attachment.html 

More information about the jboss-user mailing list