使会话组件在Java中不区分大小写

时间:2018-07-23 07:18:49

标签: java session case-sensitive

对于一个项目,我正在ADF中的Jdeveloper版本12.1.3.0.0中工作。 我正在尝试通过会话组件与文件建立连接。低于我的代码。会话组件区分大小写。我的问题是如何使该组件不区分大小写。

errorMessage = getResource("Can_t_connect_to_this_server_with_this_port_with_this_connection_type");
        session = jsch.getSession(user, server, port);
        session.setPassword(pass);
        java.util.Properties config = new java.util.Properties();
        config.put("StrictHostKeyChecking", "no");
        session.setConfig(config);
        session.connect();
        channel = session.openChannel("sftp");
        channel.connect();

        errorMessage = getResource("Ftp_folder_path_couldn_t_be_found");
        String ftpFolder = configRow.getFtpFolder();
        if (ftpFolder != null) {
            ftpFolder = ftpFolder.replace("\\", "/");
            File folderDir=new File(ftpFolder);
                if (!folderDir.isDirectory() && folderDir.exists()) {
                    String htmlMessage = "<html><body>" + errorMessage + "</body></html>";
                    //String htmlMessage = "<html><body>Server could not be reached.<BR><BR>" + e.toString() + "</body></html>";
                    FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN, "", htmlMessage));
                    testResult = false;
                }

        }

提前谢谢。

Hidde van Werkhoven

0 个答案:

没有答案