RE: javax.servlet.ServletException: Could not connect to SMTP host: localhost, port: 25

2008-07-14 Thread Jonas Wagner
Hello, It looks to me as if you didn't configure any SMTP server. You need to do something like: Properties smtpProperties = new Properties(); smtpProperties.put("mail.smtp.host", "smtp.example.com"); smtpProperties.put("mail.smtp.auth", "true"); // create the mime message Session session =

RE: Configuring DataSources using jsp: reload context.xml?

2008-07-08 Thread Jonas Wagner
Thanks Sameer for your reply! > That may work for new datasources but could create a problem > for existing data sources specifically if they are already > being used and have pooled connections. The existing pooled > connections may be in use by the applications too. Since the application connec

Re: Configuring DataSources using jsp: reload context.xml?

2008-07-08 Thread Jonas Wagner
The problem is now solved, though in a somewhat unsatisfying way. I wrote my own configuration file to store information about the data sources, and now I connect to databases using DriverManager. I'm still wondering about more elegant ways to do dynamical configuration of data sources. Would it b

RE: Configuring DataSources using jsp: reload context.xml?

2008-07-07 Thread Jonas Wagner
Good morning, I'm still trying to figure out how I can cause tomcat to re-read JNDI resources. Here is one way I found out earlier: > After further tests I found out that the server will reload JNDI data > sources if all the following steps are performed: > 1. Change the configuration > 2. Execut

Re: Configuring DataSources using jsp: reload context.xml?

2008-07-03 Thread Jonas Wagner
One more update on the problem: > An update on the problem: on my development server (managed by eclipse) > restarting the server _sometimes_ seems to apply the changes. I haven't > found out in which cases exactly. The changes are never applied when I > deploy to a production server using a .war

AW: Configuring DataSources using jsp: reload context.xml?

2008-07-02 Thread Jonas Wagner
Thanks Hassan for your question. > Are these data sources known in advance, or can the configuration > tool user come up with an arbitrary new one at any time? These data sources will be known at the time of deployment, but as they are specific for each customer, I cannot write one META-INF/conte

Configuring DataSources using jsp: reload context.xml?

2008-07-02 Thread Jonas Wagner
Hello, I'm trying to write a configuration frontend for a webapp. This application uses several data sources, and it should be possible to change the username/password/database/... using the configuration frontend. My idea was that the configuration servlet would modify the META-INF/context.xml f