Loading multiple property files

To load multiple property files using Spring’s PropertyPlaceholderConfigurer, add <property name=”ignoreUnresolvablePlaceholders” value=”true” /> to the one that is loaded first like so:

<bean id=”propertyConfigurer”
class=”org.springframework.beans.factory.config.PropertyPlaceholderConfigurer”>
<property name=”location” value=”classpath:jdbc.properties” />
<property name=”ignoreUnresolvablePlaceholders” value=”true” />
</bean>

<bean id=”mailPropertyConfigurer”
class=”org.springframework.beans.factory.config.PropertyPlaceholderConfigurer”>
<property name=”location” value=”classpath:mail.properties” />
</bean>

This will make sure both files are loaded. 🙂

Unable to compile class for JSP

If you run you web application with the Jetty eclipse plug-in it might happen that you get a”Unable to compile class for JSP” when you try to access the application in your browser. If this happens, go to the properties of your project, select ‘Java Build Path’ and ‘Add External JARs’. You need to add the ‘tools.jar’ file, which is in the ‘lib’ folder of your JDK. Good luck!