<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %> <%@ page import="com.ecyrd.jspwiki.*" %> <%@ page import="com.ecyrd.jspwiki.auth.AuthenticationManager" %> <%@ page import="com.ecyrd.jspwiki.ui.Installer" %> <%@ page import="org.apache.log4j.*" %> <%! Logger log = Logger.getLogger("JSPWiki"); %> <% WikiEngine wiki = WikiEngine.getInstance( getServletConfig() ); // Create wiki context and check for authorization WikiContext wikiContext = wiki.createContext( request, WikiContext.INSTALL ); if(!wikiContext.hasAccess( response )) return; Installer installer = new Installer( request, config ); WikiSession wikiSession = wikiContext.getWikiSession(); // Parse the existing properties installer.parseProperties(); boolean validated = false; String password = null; // If user hit "submit" button, validate and install them if( request.getParameter("submit") != null ) { validated = installer.validateProperties(); if ( validated ) { installer.saveProperties(); password = installer.createAdministrator(); if ( password != null ) { wikiSession.addMessage( Installer.INSTALL_INFO, "Because no administrator account " + "exists yet, JSPWiki created one for you, with a random password. You can change " + "this password later, of course. The account's id is " + Installer.ADMIN_ID + " and the password is " + password + ". " + "Please write this information down and keep it in a safe place. " + "JSPWiki also created a wiki group called " + Installer.ADMIN_GROUP + " that contains this user." ); } } } if ( !installer.adminExists() ) { wikiSession.addMessage( Installer.INSTALL_WARNING, "Is this the first time you've run the " + " Installer? If it is, you should know that after JSPWiki validates and saves your " + "configuration for the first time, you will need administrative privileges to access " + "this page again. We do this to prevent random people on the Internet from doing bad " + "things to your wiki." ); } // Make this HTTP response non-cached, and never-expiring response.addHeader("Pragma", "no-cache"); response.setHeader( "Expires", "-1" ); response.setHeader("Cache-Control", "no-cache" ); response.setContentType("text/html; charset=UTF-8"); %> JSPWiki Installer "/>

JSPWiki Installer

Welcome! This little JSP page is here to help you do the first difficult stage of JSPWiki installation. If you're seeing this page, you have already installed JSPWiki correctly inside your container.

There are now some things that you should configure. When you press submit, the jspwiki.properties file from the distribution will be modified, or if it can't be found, a new one will be created.

This setup system is really meant for people who just want to be up and running really quickly. If you want to integrate JSPWiki with an existing system, I would recommend that you go and edit the jspwiki.properties file directly. You can find a sample config file from yourwiki/WEB-INF/.

Basics


What should your wiki be called? Try and make this a relatively short name.

Please tell JSPWiki where your wiki is located.

By default, JSPWiki will use the VersioningFileProvider that stores files in a particular directory on your hard drive. If you specify a directory that does not exist, JSPWiki will create one for you. All attachments will also be put in the same directory.

Security


JAAS plus container security (default)
Container security only
By default, JSPWiki manages access to resources using a JAAS-based security system. It will also respect any container security constraints you might have, if you've enabled them in your web.xml file. If you disable JAAS security, JSPWiki might not work as you expect. But sometimes you might want to do this if you're trying to troubleshoot.
<% if( validated ) { if ( password != null ) { %>

Enabled

This wiki has an administrator account named admin that is part of the wiki group Admin. By default, JSPWiki's security policy grants all members of the Admin group the all-powerful AllPermission.
<% } } else { %>

Not enabled

This wiki doesn't seem to have an administrator account. When you click Configure!, JSPWiki will create one for you.
<% } %>

Advanced Settings


JSPWiki uses Jakarta Log4j for logging. Please tell JSPWiki where the log files should go.

This is the place where all caches and other runtime stuff is stored.
After you click Configure!, the installer will write your settings to <%=installer.getPropertiesPath()%>. It will also create an Administrator account with a random password and a corresponding Admin group.

<% if( validated ) { %>

Here is your new jspwiki.properties

<%=installer.getProperties()%>
<% } %>