Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Properties file or a Constants Class

Properties file or a Constants Class

2005-01-12       - By KR Kumar

 Back
Reply:     <<     11     12     13     14     15     16  

Guys,

Thanx a lot to all of you guys for the help. I got it. For example, the
name and path of configuration can change at any time, in that case name
and path of the file should be in a property file and on the other side
some application constants like SUCCESS and FAILURE which will not
change, should be put in the Constants java class.

Is that right?

-- --Original Message-- --
From: A mailing list for Java(tm) 2 Platform, Enterprise Edition
[mailto:J2EE-INTEREST@(protected)] On Behalf Of Jones, Douglas 1
Sent: Wednesday, January 12, 2005 8:05 PM
To: J2EE-INTEREST@(protected)
Subject: Re: Properties file or a Constants Class

True, this issue really does focus around the need for values that
change frequently or something that is designed to not change through
the life of the program.  I figured hearing an anecdote about how to the
prefs file was implemented might be useful, even though it doesn't
really help solve what method is better for the OP's needs.  In reality,
it seems like some things that people tell you will be constant forever
have a tendency to change, at least when writing the types of
applications that I write :)


--
Doug Jones
Co-Op Web Developer
douglas.1.jones@(protected)


-- --Original Message-- --
From: A mailing list for Java(tm) 2 Platform, Enterprise Edition
[mailto:J2EE-INTEREST@(protected)]On Behalf Of Darryl Pierce
Sent: Wednesday, January 12, 2005 9:27 AM
To: J2EE-INTEREST@(protected)
Subject: Re: Properties file or a Constants Class


On Wed, 12 Jan 2005 09:12:55 -0500, Jones, Douglas 1
<douglas.1.jones@(protected)> wrote:
> The way my group does things is to have a key value pair properties
file.
> We have a class that loads this file and puts the keys and values into
a
> hash table for easy reference later.  Each servlet that needs this
file is
> responsible for loading the file itself.  The main advantage to this
is
> being able to change values without having to restart the server.

I think the confusion here is that the OP asked about _constants_.
What I and at least one other person described was viewing the
solution from the point of view of the OP's needs; i.e., if the values
will change, put them into a properties file, and if they won't, put
them into an interface. The OP hasn't clarified their needs yet.

--
Darryl L. Pierce <mcpierce@(protected)>
Visit the Infobahn Offramp: <http://mcpierce.mypage.org>

=========================================================================To
unsubscribe, send email to listserv@(protected) and include in the
body
of the message "signoff J2EE-INTEREST".  For general help, send email to
listserv@(protected) and include in the body of the message "help".

=========================================================================To
unsubscribe, send email to listserv@(protected) and include in the
body
of the message "signoff J2EE-INTEREST".  For general help, send email to
listserv@(protected) and include in the body of the message "help".


DISCLAIMER:
This message contains privileged and confidential information and is intended
only for the individual named.If you are not the intended recipient you should
not disseminate,distribute,store,print, copy or deliver this message.Please
notify the sender immediately by e-mail if you have received this e-mail by
mistake and delete this e-mail from your system.E-mail transmission cannot be
guaranteed to be secure or error-free as information could be intercepted
,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The
sender therefore does not accept liability for any errors or omissions in the
contents of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version.

==========================================================================To
unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff J2EE-INTEREST".  For general help, send email to
listserv@(protected) and include in the body of the message "help".

©2008 junlu.com - Jax Systems, LLC, U.S.A.