Dynamic for with Spring MVC using a HashMap
Sometime you need to dynamically generate a form without knowing how many fields it will be required (i.e. when your form is driven by a configuration or by some properties). […]
Sometime you need to dynamically generate a form without knowing how many fields it will be required (i.e. when your form is driven by a configuration or by some properties). […]
To implement the MongoDB results pagination in Java, there are few parameters that need to be collected: 1) the order of results (ascending / descending) 2) the field used to […]
Suppose you need to apply some filters to your MongoDB query, for example to extract some _ids that match a regex condition. This is the way to do that: Query […]
Suppose you defined TemplateDao Spring bean in this way: <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName"><value>com.mysql.jdbc.Driver</value></property> <property name="url"><value>jdbc:mysql://${mysql.hostname}:${mysql.port}/${mysql.db}</value></property> <property name="username"><value>${mysql.user}</value></property> <property name="password"><value>${mysql.password}</value></property> </bean> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource"/> </bean> […]
While evaluating template with Velocity I am affecting a null point exception but happened only on production environment because it seems that the application is trying to write to tomcat/bin […]
I created a new Web application using Eclipse and, after Enabling Maven, I get this error updating the project: Cannot nest ‘PRJ/src/main/resource’ inside ‘PRJ/src’. To enable the nesting exclude ‘main/’ […]
I was trying to figured out how to solve this issue. Basically I’m saving a user profile bean that contains multiple occurrences of other beans inside him. Something like date: […]
If the exception “Could not get JDBC Connection; nested exception is java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/schema” is raised probably you forgot to add the <property name="driverClassName"><value>com.mysql.jdbc.Driver</value></property><property name="driverClassName"><value>com.mysql.jdbc.Driver</value></property> property […]
The objective is simple, create a method which load a class dynamically, access its method and passing their parameters value and getting the return value at run-time. To do that […]
Eclipse is defaulting to Java 1.5, when you want it to use Java 1.6. You have classes implementing interface methods, which in Java 1.6 can be annotated with @Override; however, […]