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
import static org.junit.Assert.*; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import org.junit.rules.ExternalResource; | |
import org.junit.rules.RuleChain; | |
import org.junit.rules.TestRule; | |
import org.junit.rules.TestWatcher; |
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
<context:property-placeholder location="${myApp.config.location:classpath}myApp.properties" system-properties-mode="OVERRIDE"/> |
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
import static java.util.Calendar.DAY_OF_MONTH; | |
import static java.util.Calendar.MONTH; | |
import static java.util.Calendar.YEAR; | |
import java.util.Calendar; | |
/** | |
* | |
* Validator of national identification number used in the Czech Republic. | |
* |
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
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | |
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
<html> | |
<head> | |
<title>Minification sample</title> | |
<c:choose> | |
<c:when test="${environment == 'development'}"> | |
<link rel="stylesheet" href="<c:url value="/gui/css/first.css" />" /> | |
<link rel="stylesheet" href="<c:url value="/gui/css/second.css" />" /> |
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
import org.springframework.stereotype.Controller; | |
import org.springframework.web.bind.annotation.PathVariable; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; | |
import org.springframework.web.bind.annotation.ResponseBody; | |
@Controller | |
public class UserController { | |
@RequestMapping(value = "/users/{email:.+}", method = RequestMethod.GET) |
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
import javax.faces.context.FacesContext; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.ObjectFactory; | |
import org.springframework.beans.factory.config.Scope; | |
import org.springframework.web.context.request.FacesRequestAttributes; | |
import java.util.Map; |
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
import javax.servlet.*; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
/** | |
* This filter interprets {@link FileNotFoundException} as HTTP status code <code>404</code>. | |
* | |
* @author banterCZ |
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
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.web.bind.WebDataBinder; | |
import org.springframework.web.bind.annotation.InitBinder; | |
/** | |
* @author banterCZ | |
*/ | |
@Controller | |
public class MyController { |
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
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.security.web.session.InvalidSessionStrategy; | |
import org.springframework.util.StringUtils; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import java.io.IOException; |
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
<ui:composition template="/WEB-INF/templates/layout.xhtml" | |
xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:ui="http://java.sun.com/jsf/facelets" | |
xmlns:h="http://java.sun.com/jsf/html" | |
xmlns:c="http://java.sun.com/jstl/core"> | |
<ui:define name="content"> | |
<!-- does NOT work --> | |
<!-- JSTL tags are taghandlers and they are executed during view build time, while JSF UI components are executed during view render time --> |
OlderNewer