SLF4J Logger Injection with Guice

I experimented with Google Guice Custom Injections because I wanted to inject a Logger to my guicified application. There is a great part in the Guice documentation about Custom Logger Injection, but in my case I wanted a SLF4J Logger with Logback as implementation. The example in the Guice Wiki is with Log4j Injection.

Here is how I wanted to inject loggers:

1
2
3
4
5
6
@Log
Logger log;
 
public void doSomething{
  log.info("Logmessage");
}

Weiterlesen

Different ways to redirect with JSF and Seam

This is just a quick reminder for myself how to implement programmatic redirects with JBoss Seam and JSF.

I will describe three different techniques:

  • Redirecting to a 404 Error Page from a JSF Backing Bean
  • Redirecting to an external Website
  • Redirecting to a JSF view in a Seam Application

Weiterlesen