⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _setup4__jsp.java

📁 JSP聊天系统
💻 JAVA
字号:
/*
 * JSP generated by Resin 2.1.4 (built Fri Aug  2 14:16:52 PDT 2002)
 */

package _setup;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import java.sql.*;
import org.ehotsoft.yekki.util.PropertyManager;
import org.ehotsoft.yekki.util.ParamUtil;
import org.ehotsoft.yekki.sql.ConnectionProvider;
import org.ehotsoft.yekki.sql.ConnectionManager;

public class _setup4__jsp extends com.caucho.jsp.JavaPage{
  private boolean _caucho_isDead;
  
  public void
  _jspService(javax.servlet.http.HttpServletRequest request,
              javax.servlet.http.HttpServletResponse response)
    throws java.io.IOException, javax.servlet.ServletException
  {
    com.caucho.jsp.QPageContext pageContext = (com.caucho.jsp.QPageContext) com.caucho.jsp.QJspFactory.create().getPageContext(this, request, response, null, true, 8192, true);
    javax.servlet.jsp.JspWriter out = (javax.servlet.jsp.JspWriter) pageContext.getOut();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    javax.servlet.http.HttpSession session = pageContext.getSession();
    javax.servlet.ServletContext application = pageContext.getServletContext();
    response.setContentType("text/html;charset=gb2312");
    request.setCharacterEncoding("GB2312");
    try {
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
       try { 
      pageContext.write(_jsp_string1, 0, _jsp_string1.length);
      	boolean setupError = false;
	String errorMessage = "";
	//Make sure the install has not already been completed.
	String setup = PropertyManager.getProperty("setup");
	if( setup != null && setup.equals("true") ) {

      pageContext.write(_jsp_string2, 0, _jsp_string2.length);
      	
	}
	else {
	
		boolean error = false;
		String yekkiHome = ParamUtil.getStringParameter(request,"yekkiHome");
		if (yekkiHome == null) {
		yekkiHome = PropertyManager.getProperty("yekkiHome");
		}
		boolean setYekkiHome = ParamUtil.getBooleanParameter(request,"setYekkiHome");
		//Look for error case, but only give a new error message if there isn't
		//already an error.
		if(setYekkiHome && yekkiHome == null ) {
			error = true;
			errorMessage = "No value was entered for Yekki Home. Please enter a path.";
		}
	
      pageContext.write(_jsp_string3, 0, _jsp_string3.length);
      	if( !error && setYekkiHome ) {
			// chomp a trailing "/" or "\\"
			while( yekkiHome.length() > 0 
					&& yekkiHome.charAt(yekkiHome.length()-1) == '/'
					|| yekkiHome.charAt(yekkiHome.length()-1) == '\\' )
			{
				yekkiHome = yekkiHome.substring(0,yekkiHome.length()-1);
			}
			// check if the app server can write to that file
			File yekkiHomeDir = new File(yekkiHome);
			error = !yekkiHomeDir.exists();
			if( error ) {
				errorMessage = "你输入的目录不存在. 一定要 " +
					"在你的系统文件上创建 Yekki 的主目录, 重新试一次.";
			} else {
				error = !yekkiHomeDir.canRead();
				if( error ) {
					errorMessage = "你输入的目录存在,但是你不能"+
						"读取访问它. 请修复问题,重新试一次.";
				} else {
					error = !yekkiHomeDir.canWrite();
					if( error ) {
						errorMessage = "你输入的目录存在, 但是你" +
							"不能写入访问它. 请修复此" +
							"问题,重新试一次.";
					} else {
						error = !yekkiHomeDir.isAbsolute();
						errorMessage = "你不能输入绝对路径为Yekki 主 " +
						 	"目录 (例如, 在Unix中以'/' 开始, 或 'c:\' " +
							"在Windows中). 请修复问题,重新试一次.";
					}
				}
			}
			
			// at this point, the path exists and we can read & write to it
			// so create the file
			if( !error ) {
				// create the search directory
				File searchDir = new File( yekkiHome + File.separator + "search" );
				if (!searchDir.exists()) {
					searchDir.mkdir();
				}
				// set the yekkiHome property in the jive.properties file
				PropertyManager.setProperty("yekkiHome",yekkiHome);
				// redirect
				response.sendRedirect("setup5.jsp");
				return;
			}
		}

      pageContext.write(_jsp_string4, 0, _jsp_string4.length);
      
	if (error) {

      pageContext.write(_jsp_string5, 0, _jsp_string5.length);
      out.print(( errorMessage ));
      pageContext.write(_jsp_string6, 0, _jsp_string6.length);
      	} 
      pageContext.write(_jsp_string7, 0, _jsp_string7.length);
      out.print(( (yekkiHome!=null)?yekkiHome:"" ));
      pageContext.write(_jsp_string8, 0, _jsp_string8.length);
       } //end else of setupError 
      pageContext.write(_jsp_string9, 0, _jsp_string9.length);
      	} catch (Exception e ) {
		e.printStackTrace();
	}

      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      JspFactory.getDefaultFactory().releasePageContext(pageContext);
    }
  }

  private com.caucho.java.LineMap _caucho_line_map;
  private java.util.ArrayList _caucho_depends = new java.util.ArrayList();

  public boolean _caucho_isModified()
  {
    if (_caucho_isDead)
      return true;
    if (com.caucho.util.CauchoSystem.getVersionId() != 2057024146)
      return true;
    for (int i = _caucho_depends.size() - 1; i >= 0; i--) {
      com.caucho.vfs.Depend depend;
      depend = (com.caucho.vfs.Depend) _caucho_depends.get(i);
      if (depend.isModified())
        return true;
    }
    return false;
  }

  public long _caucho_lastModified()
  {
    return 0;
  }

  public com.caucho.java.LineMap _caucho_getLineMap()
  {
    return _caucho_line_map;
  }

  public void destroy()
  {
      _caucho_isDead = true;
      super.destroy();
  }

  public void init(com.caucho.java.LineMap lineMap,
                   com.caucho.vfs.Path appDir)
    throws javax.servlet.ServletException
  {
    com.caucho.vfs.Path resinHome = com.caucho.util.CauchoSystem.getResinHome();
    com.caucho.vfs.MergePath mergePath = new com.caucho.vfs.MergePath();
    mergePath.addMergePath(appDir);
    mergePath.addMergePath(resinHome);
    mergePath.addClassPath(getClass().getClassLoader());
    _caucho_line_map = new com.caucho.java.LineMap("_setup4__jsp.java", "/setup/setup4.jsp");
    _caucho_line_map.add(2, 1);
    _caucho_line_map.add(1, 34);
    _caucho_line_map.add(9, 36);
    _caucho_line_map.add(29, 45);
    _caucho_line_map.add(46, 63);
    _caucho_line_map.add(108, 114);
    _caucho_line_map.add(111, 118);
    _caucho_line_map.add(119, 122);
    _caucho_line_map.add(130, 124);
    _caucho_line_map.add(138, 126);
    com.caucho.vfs.Depend depend;
    depend = new com.caucho.vfs.Depend(mergePath.lookup("doc/setup/setup4.jsp"), 1029982536000L, 4506L);
    _caucho_depends.add(depend);
  }

  private static byte []_jsp_string1;
  private static byte []_jsp_string7;
  private static byte []_jsp_string9;
  private static byte []_jsp_string6;
  private static byte []_jsp_string8;
  private static byte []_jsp_string2;
  private static byte []_jsp_string4;
  private static byte []_jsp_string0;
  private static byte []_jsp_string3;
  private static byte []_jsp_string5;
  static {
    try {
      _jsp_string1 = "\r\n				 \r\n".getBytes("GB2312");
      _jsp_string7 = "<form action=\"setup4.jsp\" method=\"post\">\r\n  <input type=\"hidden\" name=\"setYekkiHome\" value=\"true\">\r\n  <table cellpadding=\"3\" cellspacing=\"0\" border=\"0\">\r\n    <tr> \r\n      <td><font size=\"-1\">Yekki Home:</font></td>\r\n      <td>\r\n        <input type=\"text\" size=\"50\" name=\"yekkiHome\" value=\"".getBytes("GB2312");
      _jsp_string9 = "\r\n\r\n\r\n<p>\r\n</font>\r\n</body>\r\n</html>\r\n\r\n".getBytes("GB2312");
      _jsp_string6 = "</i> \r\n  <p> \r\n    ".getBytes("GB2312");
      _jsp_string8 = "\">\r\n      </td>\r\n    </tr>\r\n  </table>\r\n</ul>\r\n\r\n<center>\r\n<input type=\"submit\" value=\"Continue\">\r\n</center>\r\n</form>\r\n\r\n".getBytes("GB2312");
      _jsp_string2 = "\r\n	<html>\r\n<head>\r\n	<title>Yekki 安装 - 第四步</title>\r\n		<link rel=\"stylesheet\" href=\"style/global.css\">\r\n</head>\r\n\r\n<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#0000FF\" vlink=\"#800080\" alink=\"#FF0000\" background=\"../images/background.gif\">\r\n<p>\r\n\r\n	<font color=\"Red\">Error!</font>\r\n	\r\n<p><font size=2> Yekki 安装已经完成.如果你想重新运行本工具, 须从Yekki属性文件中删除'setup=true'属性.</font> \r\n  ".getBytes("GB2312");
      _jsp_string4 = "<html>\r\n  <head> \r\n  <title>Yekki Setup - Step 4</title>\r\n		<link rel=\"stylesheet\" href=\"style/global.css\"></head>\r\n  <body bgcolor=\"#FFFFFF\" background=\"../images/background.gif\" text=\"#000000\" link=\"#0000FF\" vlink=\"#800080\" alink=\"#FF0000\"> \r\n<p>\r\n\r\n<b>Yekki Home Directory</b>\r\n\r\n<ul>\r\n 在你的系统文件中 Yekki 需要一个空间存储数据. 存储此数据的目录叫\"Yekki Home\". 这一步将帮助你创建此目录. \r\n  <p> 首先判定Yekki Home 的位置. 在Unix中是\"/usr/local/yekkiHome\" , 或者 在Windows中是\"c:\\yekkiHome\"。命名此目录名为\"yekkiHome\"不是必须的,但是推荐使用. 然后创建目录,确认你的应用程序服务器能读写访问它.现在,为你在下面创建的目录输入全称路径.\r\n  <p> \r\n    ".getBytes("GB2312");
      _jsp_string0 = "\r\n".getBytes("GB2312");
      _jsp_string3 = "\r\n  ".getBytes("GB2312");
      _jsp_string5 = "\r\n    <font color=\"Red\">错误:</font></font> <i>".getBytes("GB2312");
    } catch (java.io.UnsupportedEncodingException e) {
      e.printStackTrace();
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -