> Hi,
>
> 1. why pass ServletContext, pass the String from
> sc.getRealPath to a bean.

  The ServletContext can then be used to be passed to other classes if the
Constant class boots them up. If it doesn't do it, just the String could be
passed.

> 2. you can put your ini info in an xml and use a
> program generation approach.

   Do you mean automatic code generation from the xml? In my case I guess it
would not be good. That's because I want to reuse the class in various
applications instead of have it generated, even if it is automatic. I don't
know much about this, though. Do you have any link for some good article or
documentation about it?


> 3. you can use a 'shell' class, that reads key/value
> pairs into an 'ordered' hashtable (if order is
> important), and have custom get( String key ) and set(
> k, v) methods to change values in the ordered
> hashtable.

  Actually the way of reading the file may vary a lot. I wasn't caring much
about it, because the problem I was focusing on is to how to organize
everything so different applications will work with the same code.
  Still, in my case I prefer the file as a java.util.Properties.load(...)
format, for simplicity. Because, at least for what I need, that's enough,
and there is no reason for more complexity. But if the needs ask, some other
format for keeping the information could be more appropriate.
  There surely would be get and set methods, as necessary, for the values
kept in the class.

> just some thoughts.
>
> ron
>

    []'s,

    Rodrigo.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to