Thanx all for your responses. Finally, I use java.utils.Properties class. A regular solution like Borut's apache solution. It's for a simple LDAP config, so I don't use DOM for the moment. Maybe later...
It's a shame that T5 haven't a great solution like @config(value="myProp") Thx all! ptitcon51 Thiago H. de Paula Figueiredo wrote: > > On Tue, May 19, 2009 at 7:38 AM, ptitcon51 <ptitco...@hotmail.com> wrote: > >> Hi all! > > Hi! > >> T5 reads xml file to configure himself. > > It doesn't read XML files for configuration, just for page and > component templates. web.xml is read by the servlet container (Jetty, > Tomcat, etc), not by Tapestry. > >> But I don't know if a sexy solution exists to do it myself. >> I want to externalize parameters (principally Strings) in my context.xml. >> Like this : >> >> <parameter name = "myParam" value="myValue"> >> >> I could read my xml file with Properties class like this: >> >> properties.load("context.xml") >> properties.getProperty("MyProp") >> >> But is there a magic T5 solution? With annotations for example... Like >> it's >> possible with properties file. > > If I understand what you're saying, the solution is outside Tapestry, > being using some XML package instead. I recommend JDOM. > > -- > Thiago > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://www.nabble.com/T5-Read-parameters-from-context.xml-tp23613669p23619515.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org