Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.cerebro.provevaadin; import com.google.gwt.thirdparty.guava.common.io.Files; import com.vaadin.server.VaadinServlet; import java.io.File; import java.io.IOException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * * @author matteo */ class CreateShiroIni { Logger logger = LoggerFactory.getLogger(CreateShiroIni.class); public CreateShiroIni() { File sourceShiroIni = new File(getClass().getResource("shiro.ini").getFile()); File targetShiroIni = new File( VaadinServlet.getCurrent().getServletConfig().getServletContext().getRealPath("WEB-INF") + "/shiro.ini"); try { Files.copy(sourceShiroIni, targetShiroIni); } catch (IOException ex) { logger.equals(ex.getMessage()); } } }