Mysql 使用jee-maven项目访问数据库的路径

Mysql 使用jee-maven项目访问数据库的路径,mysql,maven,servlets,jakarta-ee,thymeleaf,Mysql,Maven,Servlets,Jakarta Ee,Thymeleaf,我目前正在用JavaEE创建一个网站,使用maven、thymeleaf,并将其托管在heroku上(数据库插件是JawsDBMySQL)。 我创建了一个简单的html页面,以检查它是否工作正常。 当然,对于本地上传来说,它工作得非常好:文件会被放到我设计的文件夹中 在我的数据库中,本地存储的路径存储为字符串。 我还添加了一个longblob列,但我并不真正理解如何使用它 现在我想在应用程序联机时将文件存储到数据库中 我没有找到与我的问题完全匹配的解决方案,但我很确定它非常简单 希望我已经够清楚

我目前正在用JavaEE创建一个网站,使用maven、thymeleaf,并将其托管在heroku上(数据库插件是JawsDBMySQL)。 我创建了一个简单的html页面,以检查它是否工作正常。 当然,对于本地上传来说,它工作得非常好:文件会被放到我设计的文件夹中

在我的数据库中,本地存储的路径存储为字符串。 我还添加了一个longblob列,但我并不真正理解如何使用它

现在我想在应用程序联机时将文件存储到数据库中

我没有找到与我的问题完全匹配的解决方案,但我很确定它非常简单

希望我已经够清楚了

谢谢你的帮助

在/home2上显示带有图片列表的页面的Servlet

package marquise.servlets;


import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.WebContext;

import marquise.services.InformationLibrary;



@WebServlet("/home2")
public class HomeServlet extends AbstractGenericServlet2 {

    private static final long serialVersionUID = 5402133218271984030L;

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        TemplateEngine templateEngine = this.createTemplateEngine(req);

        WebContext context = new WebContext(req, resp, getServletContext());
        //Country countryFilter = (Country) req.getSession().getAttribute("countryFilter");

        context.setVariable("images", InformationLibrary.getInstance().listAllImages());
        //context.setVariable("cities", CityService.getInstance().listAllCities(countryFilter));
        //context.setVariable("countries", Country.values());

        //context.setVariable("countryFilterSelected", countryFilter);

        templateEngine.process("home", context, resp.getWriter());
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String countryString = req.getParameter("countryFilter");



        resp.sendRedirect("home2");

    }



}
路径的Servlet

@WebServlet("/imagepicture")
public class CityPictureServlet extends AbstractGenericServlet2 {

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        Integer imageId = Integer.parseInt(req.getParameter("id"));
        Path picturePath = InformationLibrary.getInstance().getPicturePatch(imageId);

        Files.copy(picturePath, resp.getOutputStream());
    }


}
打印图像详细信息的servlet(目前不重要) 包marquise.servlets

@WebServlet("/detail")
public class CityDetailServlet extends AbstractGenericServlet2 {

    private static final long serialVersionUID = 8559083626521311046L;

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        TemplateEngine templateEngine = this.createTemplateEngine(req);

        WebContext context = new WebContext(req, resp, getServletContext());

        Integer idImage = Integer.parseInt(req.getParameter("id"));
        context.setVariable("image", InformationLibrary.getInstance().getImage(idImage));       
        //context.setVariable("comments", InformationLibrary.getInstance().listCommentsByCity(idCity));
        context.setVariable("comments", InformationLibrary.getInstance().listAllImages());



        templateEngine.process("imagedetail", context, resp.getWriter());
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

            Integer cityId = Integer.parseInt(req.getParameter("id"));



            resp.sendRedirect(String.format("detail?id=%d", cityId));

            resp.sendRedirect("home2");
        }
}
显示我的图像列表的HTML页面

    <!doctype html>
    <html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
    <meta charset="utf-8">
    <title>City Explorer</title>
    <link rel="stylesheet" href="bootstrap/bootstrap.min.css">
    <link rel="stylesheet" href="fontawesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="css/custom.css">

    </head>
    <body>
        <header th:replace="~{common::header}"></header>

        <div id="mainContent" class="container-fluid">
            <section class="cityfilters">
                <h3>Filters</h3>
                <form class="form-inline" method="post">
                    <div class="form-group">
                        <label for="countryInput">Country</label>
                        <select class="form-control" id="countryInput" name="countryFilter">
                            <option value="">All countries</option>
                            <option th:each="country : ${countries}" th:value="${country}" th:selected="${countryFilterSelected} == ${country}">[[${country.label}]]</option>
                        </select>
                    </div>
                    <input type="submit" class="btn btn-default" value="Filter">
                </form>
            </section>
            <section class="citylist">
                <article class="citybox" th:each="image : ${images}">
                    <h3>
                        [[${image.name}]] 
                        <a th:href="'deleteimage?id='+${image.id}" class="btn btn-xs btn-danger pull-right"> 
                            <i class="fa fa-times" aria-hidden="true"></i>
                        </a>
                    </h3>
                    <p th:text="${image.summary}" class="summary"></p>
                    <div class="btn-toolbar actionbar" role="toolbar">
                        <div class="btn-group" role="group">
                            <a th:href="'detail?id='+${image.id}" class="btn btn-primary"><i
                                class="fa fa-eye" aria-hidden="true"></i> See details</a>
                        </div>

                    </div>
                    <aside class="cityPhoto">
                        <img th:src="'imagepicture?id='+${image.id}" th:alt="'Vignette '+${image.name}">
                    </aside>
                </article>
            </section>
        </div>
    </body>
    </html>

城市探险家
过滤器
国家
所有国家
[${country.label}]]

我的库类与我的计算机的路径

public class InformationLibrary {


    private static class InformationLibraryHolder{
        private final static InformationLibrary instance = new InformationLibrary();

    }

    public static InformationLibrary getInstance(){
        return InformationLibraryHolder.instance;
    }

    private InformationDao informationDao = new InformationDaoImpl();
    private UtilisateurDao utilisateurDao = new UtilisateurDaoImpl();
    private CommentaireDao commentaireDao = new CommentaireDaoImpl();
    private ArticleDao articleDao = new ArticleDaoImpl();
    private IdentifiantDao identifiantDao = new IdentifiantDaoImpl();
    private ImageDao imageDao = new ImageDao();


    private static final String PICTURE_MAIN_DIRECTORY = "/Users/louiscauvray/git/projet/src/main/resources";


    private ElementsSiteDao elementsSiteDao = new ElementsSiteDao();

    private InformationLibrary() {
    }


        //Recuperer les informations sur les utilisateurs

    public List<Information> listFilms() {
        return informationDao.listInformations();
    }

    public Information getInformation(Integer id) {
        return informationDao.getInformation(id);
    }

    public Information addInformation(Information information) {
        return informationDao.addInformation(information);
    }

    public List<Utilisateur> listUtilisateurs() {
        return utilisateurDao.listUtilisateurs();
    }

    public Utilisateur getUtilisateur(Integer id) {
        return utilisateurDao.getUtilisateur(id);
    }
    public Utilisateur getUtilisateurByNom(String nom){
        return utilisateurDao.getUtilisateurByNom(nom);
    }

    public Utilisateur addUtilisateur(String nom, String prenom) {
        return utilisateurDao.addUtilisateur(nom, prenom);
    }
        //Gerer les commentaires visible en backoffice

    public List<Commentaire> listCommentaires(){
        return commentaireDao.listCommentaires();
    }

    public Commentaire addCommentaire(String email ,String commentaire){
        return commentaireDao.addCommentaire(email, commentaire);
    }

    public List<Article> listArticles(){
        return articleDao.listArticles();

    }

    public Article addArticle(String title, String texte, LocalDate datePublication, String auteur) {
        return articleDao.addArticle(title, texte, datePublication, auteur);
    }

    public Identifiant getIdentifiant(String login, String motDePasse){
        return identifiantDao.getIdentifiant(login, motDePasse);

    }

    //Methode pour appeler les image et les chemins des images

    public List<Image> listAllImages() {

            return imageDao.listImages();
    }

    public Image getImage(Integer id) {
        if(id == null) {
            throw new IllegalArgumentException("Image id must be provided.");
        }
        return imageDao.getImage(id);
    }

    public void addImage(Image newImage, Part picture) throws IOException {
        if(newImage == null){
            throw new IllegalArgumentException("An image must be provided.");
        }
        if(newImage.getName() == null || "".equals(newImage.getName())) {
            throw new IllegalArgumentException("An image must have a name.");
        }
        if(newImage.getSummary() == null || "".equals(newImage.getSummary())) {
            throw new IllegalArgumentException("An image must have a summary.");
        }
        if(picture == null){
            throw new IllegalArgumentException("An image must contain a picture.");
        }

        Path picturePath = Paths.get(PICTURE_MAIN_DIRECTORY, picture.getSubmittedFileName());

        imageDao.addImage(newImage, picturePath.toString());


        Files.copy(picture.getInputStream(), picturePath);


    }

    public Path getPicturePatch(Integer imageId) {
        String picturePathString = imageDao.getPicturePath(imageId);
        if(picturePathString == null) {
            return getDefaultPicturePath();
        } else {
            Path picturePath = Paths.get(imageDao.getPicturePath(imageId));
            if(Files.exists(picturePath)) {
                return picturePath;
            } else {
                return getDefaultPicturePath();
            }
        }

    }

    private Path getDefaultPicturePath() {
        try {
            return Paths.get(this.getClass().getClassLoader().getResource("city-no-photo.png").toURI());
        } catch (URISyntaxException e) {
            return null;
        }
    }

    // ElementsSite Dao
        public void modifierElementTexte(String idElement, String contenuElement) {
            elementsSiteDao.modifierElementTexte(idElement, contenuElement);
        }

        public void modifierElementImage(String idElement, String contenuElement, String cheminElement) {
            elementsSiteDao.modifierElementImage(idElement, contenuElement, cheminElement);
        }

        public ElementsSite getElementById(String id) {
            return elementsSiteDao.getElementById(id) ;
        }
}
公共类信息库{
私有静态类信息库持有者{
private final static InformationLibrary实例=new InformationLibrary();
}
公共静态信息库getInstance(){
返回信息libraryholder.instance;
}
private InformationDao InformationDao=new InformationDaoImpl();
私人提款Urdao提款Urdao=新提款Urdaoimpl();
private CommentaireDao CommentaireDao=new CommentaireDaoImpl();
private ArticleDao ArticleDao=new ArticleDaoImpl();
private IdentifiantDao IdentifiantDao=新IdentifiantDaoImpl();
private-ImageDao-ImageDao=new-ImageDao();
私有静态最终字符串PICTURE\u MAIN\u DIRECTORY=“/Users/louiscauvray/git/projet/src/MAIN/resources”;
私有元素SSITEDAO ElementsSiteDao=新元素SSITEDAO();
私人资讯图书馆(){
}
//重复使用用户信息
公开电影名单{
返回informationDao.listInformations();
}
公共信息获取信息(整数id){
返回informationDao.getInformation(id);
}
公共信息补充信息(信息){
返回信息。添加信息(信息);
}
公开名单{
返回UserateAurdao.ListUserateAurs();
}
公共提款权人Get提款权人(整数id){
返回提款目的地。获取提款目的地(id);
}
公用事业单位GetUserateAturByName(字符串名称){
返回UsilisateUrdao.GetUsilisateUrbynom(nom);
}
公用公用事业单位地址公用事业单位(字符串名称、字符串前缀){
返回提款目的地。添加提款目的地(nom,prenom);
}
//Gerer les Commentals可在后台查看
公共列表列表注释(){
返回commentaireDao.listCommentaries();
}
公共评论添加评论(字符串电子邮件,字符串评论){
返回commentaireDao.addCommentaire(电子邮件,commentaire);
}
公共物品清单{
返回articleDao.listArticles();
}
公共文章addArticle(字符串标题、字符串文本、localdatepublication、字符串auteur){
return articleDao.addArticle(标题、文本、发布日期、作者);
}
公共标识getIdentification(字符串登录,字符串motDePasse){
返回IdentificationDao.getIdentification(登录,motDePasse);
}
//图像和化学图像的处理方法
公共列表列表图像(){
返回imageDao.listImages();
}
公共映像getImage(整数id){
if(id==null){
抛出新的IllegalArgumentException(“必须提供图像id”);
}
返回imageDao.getImage(id);
}
public void addImage(图像新建图像、零件图片)引发IOException{
if(newImage==null){
抛出新的IllegalArgumentException(“必须提供图像”);
}
if(newImage.getName()==null | |?“”.equals(newImage.getName()){
抛出新的IllegalArgumentException(“图像必须有名称”);
}
if(newImage.getSummary()==null | |“”.equals(newImage.getSummary())){
抛出新的IllegalArgumentException(“图像必须有摘要”);
}
if(picture==null){
抛出新的IllegalArgumentException(“图像必须包含图片”);
}
Path picturePath=Path.get(PICTURE\u MAIN\u目录,PICTURE.getSubmittedFileName());
addImage(newImage,picturePath.toString());
复制(picture.getInputStream(),picturePath);
}
公共路径GetPictureMatch(整数imageId){
字符串picturePathString=imageDao.getPicturePath(imageId);
如果(picturePathString==null){
返回getDefaultPicturePath();
}否则{
Path picturePath=Path.get(imageDao.getPicturePath(imageId));
if(Files.exists(picturePath)){
返回图片路径;
}否则{
返回getDefaultPicturePath();
}
}
}
私有路径getDefaultPicturePath(){
import marquise.daos.impl.DataSourceProvider;
import marquise.exceptions.CityExplorerRuntimeException;
import marquise.projos.Image;

public class ImageDao {

    public List<Image> listImages() {
        List<Image> images = new ArrayList<Image>();

        try (Connection connection = DataSourceProvider.getInstance().getDataSource().getConnection();
                Statement statement = connection.createStatement();
                ResultSet resultSet = statement.executeQuery("SELECT * FROM image ORDER BY name")) {
            while (resultSet.next()) {

                images.add(
                        new Image(resultSet.getInt("id"), resultSet.getString("name"), resultSet.getString("summary")));
            }
        } catch (SQLException e) {
            throw new CityExplorerRuntimeException("Error when getting images", e);
        }

        return images;
    }

    public Image getImage(Integer id) {
        try (Connection connection = DataSourceProvider.getInstance().getDataSource().getConnection();
                PreparedStatement statement = connection.prepareStatement("SELECT * FROM image WHERE id = ?")) {
            statement.setInt(1, id);
            try (ResultSet resultSet = statement.executeQuery()) {
                if (resultSet.next()) {

                    return new Image(resultSet.getInt("id"), resultSet.getString("name"), resultSet.getString("summary"));
                }
            }
        } catch (SQLException e) {
            throw new CityExplorerRuntimeException("Error when getting images", e);
        }
        return null;
    }

    public void addImage(Image newImage, String picturePath) {
        try (Connection connection = DataSourceProvider.getInstance().getDataSource().getConnection();
                PreparedStatement statement = connection.prepareStatement("INSERT INTO image(name, summary, picture) VALUES (?, ?, ?)")) {
            statement.setString(1, newImage.getName());
            statement.setString(2, newImage.getSummary());
            statement.setString(3, picturePath);
            statement.executeUpdate();
        } catch (SQLException e) {
            throw new CityExplorerRuntimeException("Error when getting images", e);
        }
    }
    public String getPicturePath(Integer id) {
        try (Connection connection = DataSourceProvider.getInstance().getDataSource().getConnection();
                PreparedStatement statement = connection.prepareStatement("SELECT picture FROM image WHERE id = ?")) {
            statement.setInt(1, id);
            try (ResultSet resultSet = statement.executeQuery()) {
                if (resultSet.next()) {
                    return resultSet.getString("picture");
                }
            }
        } catch (SQLException e) {
            throw new CityExplorerRuntimeException("Error when getting images", e);
        }
        return null;
    }

}
package marquise.daos;

import java.io.InputStream;
import java.io.OutputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;





import marquise.daos.impl.DataSourceProvider;
import marquise.exceptions.CityExplorerRuntimeException;
import marquise.projos.Image;

public class ImageDao {

    public List<Image> listImages() {
        List<Image> images = new ArrayList<Image>();

        try (Connection connection = DataSourceProvider.getInstance().getDataSource().getConnection();
                Statement statement = connection.createStatement();
                ResultSet resultSet = statement.executeQuery("SELECT * FROM image ORDER BY name")) {
            while (resultSet.next()) {

                images.add(
                        new Image(resultSet.getInt("id"), resultSet.getString("name"), resultSet.getString("summary")));
            }
        } catch (SQLException e) {
            throw new CityExplorerRuntimeException("Error when getting images", e);
        }

        return images;
    }

    public Image getImage(Integer id) {
        try (Connection connection = DataSourceProvider.getInstance().getDataSource().getConnection();
                PreparedStatement statement = connection.prepareStatement("SELECT * FROM image WHERE id = ?")) {
            statement.setInt(1, id);
            try (ResultSet resultSet = statement.executeQuery()) {
                if (resultSet.next()) {

                    return new Image(resultSet.getInt("id"), resultSet.getString("name"), resultSet.getString("summary"));
                }
            }
        } catch (SQLException e) {
            throw new CityExplorerRuntimeException("Error when getting images", e);
        }
        return null;
    }

    public void addImage(Image newImage, String picturePath) {
        try (Connection connection = DataSourceProvider.getInstance().getDataSource().getConnection();
                PreparedStatement statement = connection.prepareStatement("INSERT INTO image(name, summary, picture) VALUES (?, ?, ?)")) {
            statement.setString(1, newImage.getName());
            statement.setString(2, newImage.getSummary());
            statement.setString(3, picturePath);
            statement.executeUpdate();
        } catch (SQLException e) {
            throw new CityExplorerRuntimeException("Error when getting images", e);
        }
    }

    public void addImage(Image img, InputStream is){
        try(Connection connection = DataSourceProvider.getInstance().getDataSource().getConnection();
                PreparedStatement statement = connection.prepareStatement("INSERT INTO image(name, summary, image) VALUES (?, ?, ?)")) {
            statement.setString(1, img.getName());
            statement.setString(2, img.getSummary());
            statement.setBinaryStream(3, is);   
            statement.executeUpdate();
        } catch (SQLException e) {
            throw new CityExplorerRuntimeException("Error when getting images", e);
        }
    }
    public String getPicturePath(Integer id) {
        try (Connection connection = DataSourceProvider.getInstance().getDataSource().getConnection();
                PreparedStatement statement = connection.prepareStatement("SELECT picture FROM image WHERE id = ?")) {
            statement.setInt(1, id);
            try (ResultSet resultSet = statement.executeQuery()) {
                if (resultSet.next()) {
                    return resultSet.getString("picture");
                }
            }
        } catch (SQLException e) {
            throw new CityExplorerRuntimeException("Error when getting images", e);
        }
        return null;
    }  
    public InputStream getPicture(Integer id) {
        try (Connection connection = DataSourceProvider.getInstance().getDataSource().getConnection();
                PreparedStatement statement = connection.prepareStatement("SELECT image FROM image WHERE id = ?")) {
            statement.setInt(1, id);
            try (ResultSet resultSet = statement.executeQuery()) {
                if (resultSet.next()) {
                    return resultSet.getBinaryStream("image");
                }
            }
        } catch (SQLException e) {
            throw new CityExplorerRuntimeException("Error when getting images", e);
        }
        return null;
    }
    /*public InputStream getPicture(Integer id) {
        try (Connection connection = DataSourceProvider.getInstance().getDataSource().getConnection();
                PreparedStatement statement = connection.prepareStatement("SELECT image FROM image WHERE id = ?")) {
            statement.setInt(1, id);
            try (ResultSet resultSet = statement.executeQuery()) {
                if (resultSet.next()) {
                    return resultSet.getBlob("image") == null ? null : resultSet.getBlob("image").getBinaryStream();
                }
            }
        } catch (SQLException e) {
            throw new CityExplorerRuntimeException("Error when getting images", e);
        }
        return null;
    }*/



}
package marquise.servlets;

import java.io.IOException;
import java.io.InputStream;

import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Part;

import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.WebContext;

import marquise.projos.Image;
import marquise.services.InformationLibrary;

@WebServlet("/addimage")
@MultipartConfig
public class ImageAddServlet extends AbstractGenericServlet2 {

    private static final long serialVersionUID = -3497793006266174453L;

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.setCharacterEncoding("UTF-8");
        TemplateEngine templateEngine = this.createTemplateEngine(req);

        WebContext context = new WebContext(req, resp, getServletContext());
        if(req.getSession().getAttribute("imageCreationError") != null) {
            context.setVariable("errorMessage", req.getSession().getAttribute("imageCreationError"));
            context.setVariable("image", (Image) req.getSession().getAttribute("imageCreationData"));

            req.getSession().removeAttribute("imageCreationError");
            req.getSession().removeAttribute("imageCreationData");
        } else {
            context.setVariable("image", new Image(null, null, null));
        }
        context.setVariable("countries", context);
        templateEngine.process("connectedUsers/imageadd", context, resp.getWriter());
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String name = req.getParameter("name");
        String summary = req.getParameter("summary");



        Part imagePicture = req.getPart("picture");
        Image newImage = new Image(null, name, summary);
        InputStream is  = imagePicture.getInputStream();

        try {
            InformationLibrary.getInstance().addImage(newImage, is);
            resp.sendRedirect("certificatsAdmin");
        } catch (IllegalArgumentException|IOException e) {
            req.getSession().setAttribute("imageCreationError", e.getMessage());
            req.getSession().setAttribute("imageCreationData", newImage);
            resp.sendRedirect("addimage");
        } 

    }


}
package marquise.servlets;


import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.WebContext;

import marquise.services.InformationLibrary;



@WebServlet("/certificatsAdmin")
public class listeCertifServlet extends AbstractGenericServlet2 {

    private static final long serialVersionUID = 5402133218271984030L;

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.setCharacterEncoding("UTF-8");
        PrintWriter out = resp.getWriter();
        HttpSession session=req.getSession(false);

        if(session != null){}
        else{
            resp.sendRedirect("connexion");
            out.println("Veuillez entre un mot de passe correct");
        }
        TemplateEngine templateEngine = this.createTemplateEngine(req);

        WebContext context = new WebContext(req, resp, getServletContext());
        //Country countryFilter = (Country) req.getSession().getAttribute("countryFilter");

        context.setVariable("images", InformationLibrary.getInstance().listAllImages());
        //context.setVariable("cities", CityService.getInstance().listAllCities(countryFilter));
        //context.setVariable("countries", Country.values());

        //context.setVariable("countryFilterSelected", countryFilter);

        templateEngine.process("admin/certificatsAdmin", context, resp.getWriter());
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String countryString = req.getParameter("countryFilter");



        resp.sendRedirect("certificatsAdmin");

    }



}