📄 _setup__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.lang.reflect.*;
public class _setup__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);
out.print(( application.getServerInfo() ));
pageContext.write(_jsp_string2, 0, _jsp_string2.length);
//See if they have Java2 or later installed by trying to load java.util.HashMap.
boolean isJava2 = true;
try {
Class.forName("java.util.HashMap");
}
catch (ClassNotFoundException cnfe) {
isJava2 = false;
}
if (isJava2) {
pageContext.write(_jsp_string3, 0, _jsp_string3.length);
}
else {
pageContext.write(_jsp_string4, 0, _jsp_string4.length);
}
pageContext.write(_jsp_string5, 0, _jsp_string5.length);
//See if the Yekki classes are installed
boolean yekkiInstalled = true;
try {
Class.forName("com.coolservlets.forum.Forum");
Class.forName("org.ehotsoft.yekki.sql.SQLFacade");
}
catch (ClassNotFoundException cnfe) {
yekkiInstalled = false;
}
if (yekkiInstalled) {
pageContext.write(_jsp_string6, 0, _jsp_string6.length);
}
else {
pageContext.write(_jsp_string7, 0, _jsp_string7.length);
}
pageContext.write(_jsp_string8, 0, _jsp_string8.length);
//See if the Lucene classes are installed
boolean luceneInstalled = true;
try {
Class.forName("com.lucene.document.Document");
}
catch (ClassNotFoundException cnfe) {
luceneInstalled = false;
}
if (yekkiInstalled) {
pageContext.write(_jsp_string9, 0, _jsp_string9.length);
}
else {
pageContext.write(_jsp_string10, 0, _jsp_string10.length);
}
pageContext.write(_jsp_string11, 0, _jsp_string11.length);
//See if the Lucene classes are installed
boolean ecsInstalled = true;
try {
Class.forName("org.apache.ecs.html.Html");
}
catch (ClassNotFoundException cnfe) {
ecsInstalled = false;
}
if (ecsInstalled) {
pageContext.write(_jsp_string12, 0, _jsp_string12.length);
}
else {
pageContext.write(_jsp_string13, 0, _jsp_string13.length);
}
pageContext.write(_jsp_string14, 0, _jsp_string14.length);
//Check status of Yekki.properties file. Because some servlet engines have seperate class
//loaders for JSP and other Java classes, we need to use the Yekki PropertyManager to
//get the properties. We use reflection to call methods on PropertyManager so that we don't
//have to do an import of that class and screw up the error messages for failure to load Yekki classes.
boolean propError = false;
String errorMessage = null;
String path = null;
try {
Class propManager = Class.forName("org.ehotsoft.yekki.util.PropertyManager");
Method propReadable = propManager.getMethod("propertyFileIsReadable", null);
if ( ((Boolean)propReadable.invoke(null,null)).booleanValue() ) {
//Now, get property
Method getProperty = propManager.getMethod("getProperty", new Class[] { Class.forName("java.lang.String") } );
path = (String)getProperty.invoke(null, new Object[] { "path" } );
if (path == null || path.equals("")) {
propError = true;
errorMessage = "The Yekki properties were successfully loaded. However, the " +
"path field was not set which prevents Yekki from being able to save " +
"properties to the filesystem. Edit the properties file and add a path " +
"field that looks something like: 'path=c:\\path\\to\\Yekki.properties' " +
"or 'path=/path/to/Yekki.properties'.";
}
//Otherwise, see if the file exists
else {
Method propExists = propManager.getMethod("propertyFileExists", null);
if ( ((Boolean)propExists.invoke(null,null)).booleanValue() ) {
//See if we can write to the file
Method propWritable = propManager.getMethod("propertyFileIsWritable", null);
if ( !((Boolean)propWritable.invoke(null,null)).booleanValue() ) {
propError = true;
errorMessage = "The Yekki properties were successfully loaded and found at "<code>" +
path + "</code>". However, the application server does not have write permission " +
"on the file.";
}
}
//The file doesn't exist
else {
propError = true;
errorMessage = "The Yekki properties were successfully loaded. However, the path "<code>" +
path + "</code>" does not appear to exist. Edit the Yekki.properties file and make sure " +
"that the path field points to exactly where the properties file exists on your " +
"filesystem.";
}
}
}
else {
propError = true;
errorMessage = "The Yekki.properties file could not be loaded. Make sure that it is " +
"in the classpath of your application server.";
}
}
catch (Exception e) {
e.printStackTrace();
propError = true;
errorMessage = "There was a general error loading the Yekki properties. Be sure that you " +
"have installed the latest Yekki code.";
}
if (!propError) {
pageContext.write(_jsp_string15, 0, _jsp_string15.length);
out.print(( path ));
pageContext.write(_jsp_string16, 0, _jsp_string16.length);
}
else {
pageContext.write(_jsp_string17, 0, _jsp_string17.length);
out.print(( errorMessage ));
pageContext.write(_jsp_string18, 0, _jsp_string18.length);
}
pageContext.write(_jsp_string19, 0, _jsp_string19.length);
if (propError || !yekkiInstalled || !isJava2 || !ecsInstalled) {
pageContext.write(_jsp_string20, 0, _jsp_string20.length);
}
else {
pageContext.write(_jsp_string21, 0, _jsp_string21.length);
}
pageContext.write(_jsp_string22, 0, _jsp_string22.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("_setup__jsp.java", "/admin/forum/setup/setup.jsp");
_caucho_line_map.add(8, 1);
_caucho_line_map.add(1, 29);
_caucho_line_map.add(37, 37);
_caucho_line_map.add(40, 39);
_caucho_line_map.add(54, 51);
_caucho_line_map.add(64, 56);
_caucho_line_map.add(83, 73);
_caucho_line_map.add(94, 78);
_caucho_line_map.add(112, 94);
_caucho_line_map.add(123, 99);
_caucho_line_map.add(141, 115);
_caucho_line_map.add(152, 120);
_caucho_line_map.add(155, 124);
_caucho_line_map.add(227, 195);
_caucho_line_map.add(230, 197);
_caucho_line_map.add(237, 201);
_caucho_line_map.add(242, 205);
_caucho_line_map.add(254, 210);
com.caucho.vfs.Depend depend;
depend = new com.caucho.vfs.Depend(mergePath.lookup("file:/e:/jnjt/admin/forum/setup/setup.jsp"), 1029894425931L, 8058L);
_caucho_depends.add(depend);
}
private static byte []_jsp_string5;
private static byte []_jsp_string7;
private static byte []_jsp_string18;
private static byte []_jsp_string14;
private static byte []_jsp_string22;
private static byte []_jsp_string6;
private static byte []_jsp_string16;
private static byte []_jsp_string15;
private static byte []_jsp_string13;
private static byte []_jsp_string1;
private static byte []_jsp_string17;
private static byte []_jsp_string19;
private static byte []_jsp_string4;
private static byte []_jsp_string21;
private static byte []_jsp_string20;
private static byte []_jsp_string8;
private static byte []_jsp_string2;
private static byte []_jsp_string3;
private static byte []_jsp_string9;
private static byte []_jsp_string0;
private static byte []_jsp_string11;
private static byte []_jsp_string10;
private static byte []_jsp_string12;
static {
_jsp_string5 = "\r\n \r\n ".getBytes();
_jsp_string7 = "\r\n <tr><td valign=top><img src=\"images/x.gif\" width=\"13\" height=\"13\"></td><td>\r\n <font color=\"red\">\r\n The Yekki application files could not be loaded. Follow the installation documentation\r\n instructions and ensure that the class files are in the classpath of your\r\n application server.\r\n </font>\r\n </td></tr> \r\n ".getBytes();
_jsp_string18 = "\r\n </font>\r\n </td></tr> \r\n ".getBytes();
_jsp_string14 = "\r\n ".getBytes();
_jsp_string22 = "\r\n\r\n<p>\r\n<hr size=\"0\">\r\n</font>\r\n</body>\r\n</html>\r\n\r\n".getBytes();
_jsp_string6 = "\r\n <tr><td valign=top><img src=\"images/check.gif\" width=\"13\" height=\"13\"></td><td>\r\n The Yekki application files are installed.\r\n </td></tr>\r\n ".getBytes();
_jsp_string16 = ".\r\n </td></tr>\r\n ".getBytes();
_jsp_string15 = "\r\n <tr><td valign=top><img src=\"images/check.gif\" width=\"13\" height=\"13\"></td><td>\r\n The Yekki properties were successfully loaded and found at ".getBytes();
_jsp_string13 = "\r\n <tr><td valign=top><img src=\"images/x.gif\" width=\"13\" height=\"13\"></td><td>\r\n <font color=\"red\">\r\n The ECS application files could not be loaded. Follow the installation \r\n documentation instructions and ensure that the class files are in the classpath \r\n of your application server.( You can find in on www.apache.org );\r\n </font>\r\n </td></tr> \r\n ".getBytes();
_jsp_string1 = "\r\n<html>\r\n<head>\r\n <title>Yekki Setup</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<p>\r\n\r\n<b>Welcome to Yekki Setup</b>\r\n<p>\r\n\r\nWe've detected that your system needs to be setup for Yekki. This tool will\r\nguide you through making a connection to your database and setting up an administrator\r\naccount. After completing setup, you'll be able to use the admin tool to create\r\nforums and start using Yekki.\r\n<p>\r\nIf you encounter problems with the setup process, please report them to \r\n<a href=\"mailto:aspphp@fm365.com\">aspphp@fm365.com</a>.\r\nIf you'd like to return here at some point in the future after\r\ncompleting the intial setup, delete the \r\n\"setup=true\" field from your Yekki.properties file.\r\n<p>\r\n<b>Setup Checklist</b>\r\n<ul>\r\n<table border=0>\r\n \r\n <tr><td valign=top><img src=\"images/check.gif\" width=\"13\" height=\"13\"></td><td>\r\n Setup has detected that you are running ".getBytes();
_jsp_string17 = "\r\n <tr><td valign=top><img src=\"images/x.gif\" width=\"13\" height=\"13\"></td><td>\r\n <font color=\"red\">\r\n ".getBytes();
_jsp_string19 = "\r\n \r\n</table>\r\n</ul>\r\n\r\n".getBytes();
_jsp_string4 = "\r\n <tr><td valign=top><img src=\"images/x.gif\" width=\"13\" height=\"13\"></td><td>\r\n <font color=\"red\">\r\n You do not appear to be running Java 2 or later. Therefore, setup cannot continue. \r\n If possible, upgrade your version of Java and restart this process.\r\n </font>\r\n </td></tr> \r\n ".getBytes();
_jsp_string21 = "\r\n</font>\r\n\r\n<form action=\"setup2.jsp\" method=post>\r\n\r\n<center>\r\n<input type=\"submit\" value=\"Continue >\">\r\n</center>\r\n\r\n".getBytes();
_jsp_string20 = "\r\n <font color=\"red\"><b>One or more errors occured in the initial setup checklist. Please correct \r\n them, restart your application server, and then reload this page.</b></font>\r\n".getBytes();
_jsp_string8 = "\r\n \r\n ".getBytes();
_jsp_string2 = ".\r\n </td></tr>\r\n \r\n ".getBytes();
_jsp_string3 = " \r\n <tr><td valign=top><img src=\"images/check.gif\" width=\"13\" height=\"13\"></td><td>\r\n You are running Java 2 or later.\r\n </td></tr>\r\n ".getBytes();
_jsp_string9 = "\r\n <tr><td valign=top><img src=\"images/check.gif\" width=\"13\" height=\"13\"></td><td>\r\n The Lucene application files are installed.\r\n </td></tr>\r\n ".getBytes();
_jsp_string0 = "\r\n\r\n".getBytes();
_jsp_string11 = "\r\n \r\n ".getBytes();
_jsp_string10 = "\r\n <tr><td valign=top><img src=\"images/x.gif\" width=\"13\" height=\"13\"></td><td>\r\n <font color=\"red\">\r\n The Lucene application files could not be loaded. Follow the installation \r\n documentation instructions and ensure that the class files are in the classpath \r\n of your application server.\r\n </font>\r\n </td></tr> \r\n ".getBytes();
_jsp_string12 = "\r\n <tr><td valign=top><img src=\"images/check.gif\" width=\"13\" height=\"13\"></td><td>\r\n The ECS application files are installed.\r\n </td></tr>\r\n ".getBytes();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -