blob: 3df832ca127cdd9d55f310f1ff2bb96908e828f3 [file] [log] [blame]
<%@ page import="org.apache.log4j.*" %>
<%@ page import="com.ecyrd.jspwiki.*" %>
<%@ page import="com.ecyrd.jspwiki.attachment.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ecyrd.jspwiki.tags.WikiTagBase" %>
<%@ page import="com.ecyrd.jspwiki.auth.*" %>
<%@ page errorPage="/Error.jsp" %>
<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
<%!
/**
* This page contains the logic for finding and including
the correct login form, which is usually loaded from
the template directory's LoginContent.jsp page.
It should not be requested directly by users. If
container-managed authentication is in force, the container
will prevent direct access to it.
*/
public void jspInit()
{
wiki = WikiEngine.getInstance( getServletConfig() );
}
Category log = Category.getInstance("JSPWiki");
WikiEngine wiki;
%>
<%
// Stash the Login page context, then go and find the login form
WikiContext wikiContext = wiki.createContext( request, WikiContext.LOGIN );
NDC.push( wiki.getApplicationName() + ":LoginForm.jsp" );
pageContext.setAttribute( WikiTagBase.ATTR_CONTEXT,
wikiContext,
PageContext.REQUEST_SCOPE );
response.setContentType("text/html; charset="+wiki.getContentEncoding() );
String contentPage = wiki.getTemplateManager().findJSP( pageContext,
wikiContext.getTemplate(),
"ViewTemplate.jsp" );
log.debug("Login template content is: " + contentPage);
%>
<wiki:Include page="<%=contentPage%>" />
<%
// Pop the page context
NDC.pop();
NDC.remove();
%>