This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/appserver/pom.xml b/appserver/pom.xml | |
index 1e49f3a9d..75a4d3914 100644 | |
--- a/appserver/pom.xml | |
+++ b/appserver/pom.xml | |
@@ -161,6 +161,10 @@ | |
<weld.version>4.0.1.SP1</weld.version> | |
<jboss.classfilewriter.version>1.2.4.Final</jboss.classfilewriter.version> | |
+ <!-- Jakarta MVC --> | |
+ <mvc-api.version>2.0.0</mvc-api.version> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@WebFilter(urlPatterns = "/*") | |
public class RelativeRedirectsFilter implements Filter { | |
@Override | |
public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain ) | |
throws IOException, ServletException { | |
chain.doFilter( request, new RelativeRedirectResponse( (HttpServletResponse) response ) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@WebFilter("/*") | |
public class NoopServletFilter implements Filter { | |
@Override | |
public void init(FilterConfig filterConfig) throws ServletException { | |
// empty | |
} | |
@Override | |
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
@Path("/simple") | |
public class SimpleController { | |
@GET | |
public String get() { | |
return "simple.jsp"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// some interface | |
public interface Plugin { | |
// ... | |
} | |
// standard bean | |
public class FirstPlugin implements Plugin { | |
// ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Message implements Serializable { | |
private static final long serialVersionUID = 2518143831776562527L; | |
public enum Severity { | |
INFO, | |
WARN, | |
ERROR | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This will result in an additional ViewEngine. The priority ensures | |
* that this implementation is preferred. | |
*/ | |
@Priority(1000) | |
public class AdditionalViewEngine extends FreemarkerViewEngine { | |
@Override | |
protected Configuration buildConfiguration() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomConfigurationProducer extends DefaultConfigurationProducer { | |
@Override | |
@Specializes | |
@Produces | |
@ViewEngineConfig // <--- See my note in the mail | |
public Configuration getConfiguration() { | |
Configuration config = super.getConfiguration(); | |
// do custom initialization here | |
return config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
@Path("/somepage") | |
public class SomeController { | |
@Inject | |
private Result result; | |
@Inject | |
private Validator validation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UserClientIpActivationStrategy implements ActivationStrategy { | |
private final ActivationStrategy userStrategy = new UsernameActivationStrategy(); | |
private final ActivationStrategy ipStrategy = new ClientIpActivationStrategy(); | |
@Override | |
public String getId() { | |
return "user-ip"; | |
} |
NewerOlder