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

📄 _setup4__jsp.java

📁 JSP聊天系统
💻 JAVA
字号:
/*
 * JSP generated by Resin 2.1.2 (built Tue Jun 11 08:26:56 PDT 2002)
 */

package _admin._forum._setup;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import java.sql.*;
import com.coolservlets.forum.*;
import com.coolservlets.forum.util.*;
import com.coolservlets.forum.database.*;

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");
    try {
      
/**
 * Yekki Setup Tool
 * November 28, 2000
 */

      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string1, 0, _jsp_string1.length);
       try { 
      pageContext.write(_jsp_string2, 0, _jsp_string2.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_string3, 0, _jsp_string3.length);
      	
	}
	else {
	
		boolean error = false;
		String yekkiHome = ParamUtils.getParameter(request,"yekkiHome");
		if (yekkiHome == null) {
		yekkiHome = PropertyManager.getProperty("yekkiHome");
		}
		boolean setYekkiHome = ParamUtils.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_string4, 0, _jsp_string4.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 = "The directory you entered doesn't exist. Be sure to " +
					"create the Yekki Home directory on your filesystem, and then try again.";
			} else {
				error = !yekkiHomeDir.canRead();
				if( error ) {
					errorMessage = "The directory you entered exists, but you don't "+
						"have read access for it. Please fix the problem and try again.";
				} else {
					error = !yekkiHomeDir.canWrite();
					if( error ) {
						errorMessage = "The directory you entered exists, buy you " +
							"don't have have write access for it. Please fix the " +
							"problem and try again.";
					} else {
						error = !yekkiHomeDir.isAbsolute();
						errorMessage = "You didn't enter an absolute path for the Yekki Home " +
						 	"directory (e.g., starting the path with '/' in Unix, or 'c:\' " +
							"in Windows). Please fix the problem and try again.";
					}
				}
			}
			
			// 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_string5, 0, _jsp_string5.length);
      
	if (error) {

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

      pageContext.write(_jsp_string11, 0, _jsp_string11.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() != 2057024144)
      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", "/admin/forum/setup/setup4.jsp");
    _caucho_line_map.add(8, 1);
    _caucho_line_map.add(1, 32);
    _caucho_line_map.add(15, 40);
    _caucho_line_map.add(42, 49);
    _caucho_line_map.add(59, 67);
    _caucho_line_map.add(137, 118);
    _caucho_line_map.add(145, 124);
    _caucho_line_map.add(154, 126);
    _caucho_line_map.add(165, 128);
    _caucho_line_map.add(175, 130);
    com.caucho.vfs.Depend depend;
    depend = new com.caucho.vfs.Depend(mergePath.lookup("file:/e:/jnjt/admin/forum/setup/setup4.jsp"), 1029895114961L, 5146L);
    _caucho_depends.add(depend);
  }

  private static byte []_jsp_string2;
  private static byte []_jsp_string10;
  private static byte []_jsp_string6;
  private static byte []_jsp_string4;
  private static byte []_jsp_string9;
  private static byte []_jsp_string3;
  private static byte []_jsp_string8;
  private static byte []_jsp_string0;
  private static byte []_jsp_string1;
  private static byte []_jsp_string5;
  private static byte []_jsp_string7;
  private static byte []_jsp_string11;
  static {
    _jsp_string2 = "\r\n				 \r\n".getBytes();
    _jsp_string10 = "\r\n\r\n\r\n<p>\r\n<hr size=\"0\">\r\n<center><font size=\"-1\"><i>www.coolservlets.com/jive</i></font></center>\r\n</font>\r\n</body>\r\n</html>\r\n\r\n".getBytes();
    _jsp_string6 = "\r\n\r\n	<font color=\"Red\">Error:</font></font>	<i>".getBytes();
    _jsp_string4 = "\r\n	".getBytes();
    _jsp_string9 = "\"></td>\r\n	</tr>\r\n	</table>\r\n\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();
    _jsp_string3 = "\r\n	<html>\r\n<head>\r\n	<title>Yekki Setup - Step 4</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\">\r\n\r\n<img src=\"images/setup.gif\" width=\"210\" height=\"38\" alt=\"Yekki Setup\" border=\"0\">\r\n<hr size=\"0\"><p>\r\n\r\n	<font color=\"Red\">Error!</font>\r\n	<p><font size=2>\r\n	\r\n	Yekki setup appears to have already been completed. If you'd like to re-run \r\n	this tool, delete the 'setup=true' property from your jive.properties file.\r\n	\r\n	</font>\r\n		\r\n".getBytes();
    _jsp_string8 = "\r\n	\r\n	\r\n	<form action=\"setup4.jsp\" method=\"post\">\r\n	<input type=\"hidden\" name=\"setYekkiHome\" value=\"true\">\r\n		\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><input type=\"text\" size=\"50\" name=\"yekkiHome\" value=\"".getBytes();
    _jsp_string0 = "\r\n\r\n".getBytes();
    _jsp_string1 = "\r\n		\r\n".getBytes();
    _jsp_string5 = "\r\n\r\n\r\n<html>\r\n<head>\r\n	<title>Yekki Setup - Step 4</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\">\r\n\r\n<img src=\"images/setup.gif\" width=\"210\" height=\"38\" alt=\"Yekki Setup\" border=\"0\">\r\n<hr size=\"0\"><p>\r\n\r\n<b>Yekki Home Directory</b>\r\n\r\n<ul>\r\n\r\n<font size=\"2\">\r\n	Yekki needs a place to store data on your filesystem. The directory where this\r\n	data is stored is called \"Yekki Home\". This step in the setup tool will help\r\n	you create this directory.\r\n	<p>\r\n	First decide where you'd like Yekki Home to exist. This could be \"/usr/local/yekkiHome\"\r\n	in Unix, or \"c:\\yekkiHome\" in Windows. Naming the directory \"yekkiHome\" is not\r\n	required, but is recommended. After creating the directory, make sure that\r\n	your application server has read and write access to it. Now, enter the full\r\n	path to the directory you created below.<p>\r\n\r\n".getBytes();
    _jsp_string7 = "</i>\r\n\r\n	<p>\r\n\r\n".getBytes();
    _jsp_string11 = "\r\n".getBytes();
  }
}

⌨️ 快捷键说明

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