Posts

Showing posts from June, 2014

Code Quality Assurance Using SonarQube

Here is how you enable SonarQube in your Maven based project. Just put this into your pom.xml : <build> <plugins> <plugin> <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-maven-plugin</artifactId> <version>4.3</version> </plugin> </plugins> </build> <profiles> <profile> <id>sonar</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <sonar.profile>Your Profile</sonar.profile> <sonar.branch>master</sonar.branch> <sonar.projectDescription>Your Description</sonar.projectDescription> <sonar.buildbreaker.skip>false</sonar.buildbreaker.skip> <sonar.jdbc.url>jdbc:mysql:// sonar.example.com :3306/sonar</sonar.jdbc.url> <sonar.login>sonar</sonar.l

Remote host browser policy for local HTML5 development

Use the domain  local.loxal.net  if you want to access your  localhost  applying  remote host execution policy  of your browsers JavaScrip virtual machine. Also some HTML5 APIs are only usable when you call them from a remote hostname. To verify that everything works correctly, just execute  ping  local.loxal.net   which should execute pings against your  127.0.0.1 IP address , aka  localhost . idea:~/my/project/loxal/Vel master  ping  local.loxal.net PING localhost (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.082 ms 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.127 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.128 ms

GoF Architectural Design Patterns for OOD

Creational Patterns Abstract Factory Builder Factory Method Prototype Singleton Structural Patterns Adapter Bridge Composite Decorator Facade Flyweight Proxy Behavioral Patterns Chain of Responsibility Command Interpreter Iterator Mediator Memento Observer State Strategy Template Method Visitor

List Files in a Java Web App

Put this into your web.xml and override so the default  servlet configuration declared by every Servlet Container (Tomcat, Jetty, GlassFish):     <servlet>         <servlet-name>default</servlet-name>         <init-param>             <!--boolean paramter to allow directory traversal-->             <!--this parameter name depends on the specific servlet container implementation-->             <!--valid for Jetty, Tomcat uses a different parameter-->             <param-name>dirAllowed</param-name>             <param-value>false</param-value>         </init-param>     </servlet>     <servlet-mapping>         <servlet-name>default</servlet-name>         <!--folder name in the "webapp" folder-->         <url-pattern>/static/*</url-pattern>     </servlet-mapping>