📄 _setup__jsp.java
字号:
/*
* JSP generated by Resin 2.1.2 (built Tue Jun 11 08:26:56 PDT 2002)
*/
package _forum._admin._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 {
/**
* Jive 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 Jive classes are installed
boolean jiveInstalled = true;
try {
Class.forName("com.coolservlets.forum.Forum");
}
catch (ClassNotFoundException cnfe) {
jiveInstalled = false;
}
if (jiveInstalled) {
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 (jiveInstalled) {
pageContext.write(_jsp_string9, 0, _jsp_string9.length);
}
else {
pageContext.write(_jsp_string10, 0, _jsp_string10.length);
}
pageContext.write(_jsp_string8, 0, _jsp_string8.length);
//Check status of jive.properties file. Because some servlet engines have seperate class
//loaders for JSP and other Java classes, we need to use the Jive 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 Jive classes.
boolean propError = false;
String errorMessage = null;
String path = null;
try {
Class propManager = Class.forName("com.coolservlets.forum.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 Jive properties were successfully loaded. However, the " +
"path field was not set which prevents Jive 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\\jive.properties' " +
"or 'path=/path/to/jive.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 Jive 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 Jive properties were successfully loaded. However, the path "<code>" +
path + "</code>" does not appear to exist. Edit the jive.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 jive.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 Jive properties. Be sure that you " +
"have installed the latest Jive code.";
}
if (!propError) {
pageContext.write(_jsp_string11, 0, _jsp_string11.length);
out.print(( path ));
pageContext.write(_jsp_string12, 0, _jsp_string12.length);
}
else {
pageContext.write(_jsp_string13, 0, _jsp_string13.length);
out.print(( errorMessage ));
pageContext.write(_jsp_string14, 0, _jsp_string14.length);
}
pageContext.write(_jsp_string15, 0, _jsp_string15.length);
if (propError || !jiveInstalled || !isJava2) {
pageContext.write(_jsp_string16, 0, _jsp_string16.length);
}
else {
pageContext.write(_jsp_string17, 0, _jsp_string17.length);
}
pageContext.write(_jsp_string18, 0, _jsp_string18.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", "/forum/admin/setup/setup.jsp");
_caucho_line_map.add(8, 1);
_caucho_line_map.add(1, 29);
_caucho_line_map.add(39, 37);
_caucho_line_map.add(42, 39);
_caucho_line_map.add(56, 51);
_caucho_line_map.add(66, 56);
_caucho_line_map.add(84, 72);
_caucho_line_map.add(95, 77);
_caucho_line_map.add(113, 93);
_caucho_line_map.add(124, 98);
_caucho_line_map.add(200, 173);
_caucho_line_map.add(203, 175);
_caucho_line_map.add(210, 179);
_caucho_line_map.add(215, 183);
_caucho_line_map.add(227, 188);
com.caucho.vfs.Depend depend;
depend = new com.caucho.vfs.Depend(mergePath.lookup("file:/e:/jnjt/forum/admin/setup/setup.jsp"), 989631938000L, 7362L);
_caucho_depends.add(depend);
}
private static byte []_jsp_string5;
private static byte []_jsp_string14;
private static byte []_jsp_string1;
private static byte []_jsp_string12;
private static byte []_jsp_string13;
private static byte []_jsp_string15;
private static byte []_jsp_string4;
private static byte []_jsp_string7;
private static byte []_jsp_string17;
private static byte []_jsp_string11;
private static byte []_jsp_string6;
private static byte []_jsp_string16;
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_string10;
private static byte []_jsp_string18;
static {
_jsp_string5 = "\r\n \r\n ".getBytes();
_jsp_string14 = "\r\n </font>\r\n </td></tr> \r\n ".getBytes();
_jsp_string1 = "\r\n<html>\r\n<head>\r\n <title>Jive 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<img src=\"images/setup.gif\" width=\"210\" height=\"38\" alt=\"Jive Setup\" border=\"0\">\r\n\r\n<hr size=\"0\"><p>\r\n\r\n<b>Welcome to Jive Setup</b>\r\n<p>\r\n\r\nWe've detected that your system needs to be setup for Jive. 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 Jive.\r\n<p>\r\nIf you encounter problems with the setup process, please report them to \r\n<a href=\"mailto:matt@coolservlets.com\">matt@coolservlets.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 jive.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_string12 = ".\r\n </td></tr>\r\n ".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 ".getBytes();
_jsp_string15 = "\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_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 Jive 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_string17 = "\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_string11 = "\r\n <tr><td valign=top><img src=\"images/check.gif\" width=\"13\" height=\"13\"></td><td>\r\n The Jive properties were successfully loaded and found at ".getBytes();
_jsp_string6 = "\r\n <tr><td valign=top><img src=\"images/check.gif\" width=\"13\" height=\"13\"></td><td>\r\n The Jive application files are installed.\r\n </td></tr>\r\n ".getBytes();
_jsp_string16 = "\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_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_string18 = "\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();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -