alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

jforum example source code file (LoginContent.jsp)

This example jforum source code file (LoginContent.jsp) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - jforum tags/keywords

authenticationmanager, don't, don't, get, join, lost, password, please, post, post, string, user, welcome, wikiengine

The jforum LoginContent.jsp source code

<%@ page import="com.ecyrd.jspwiki.*" %>
<%@ page import="com.ecyrd.jspwiki.auth.*" %>
<%@ page errorPage="/Error.jsp" %>
<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>

<%! 
    public void jspInit()
    {
        WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
        AuthenticationManager mgr = wiki.getAuthenticationManager();
        if ( mgr.isContainerAuthenticated() )
        {   
            postURL = "j_security_check";
        }
        else
        {
            postURL = "Login.jsp";
        }
    }
    String postURL;
%>

<h3>Login

<div class="formcontainer">
  <div class="instructions">
    Welcome to <wiki:Variable var="applicationname" />. Please sign in
    with your login name and password.
  </div>
  <div class="instructions">
    <wiki:Messages div="error" prefix="Error: " />
  </div>

  <form id="login" action="<%=postURL%>" 
    method="POST" accept-charset="<wiki:ContentEncoding />" >
      
    <!-- User name -->
    <div class="block">
      <label>Login
      <input type="text" name="j_username" value="
    </div>

    <!-- Password -->
    <div class="block">
      <label>Password
      <input type="password" name="j_password" />
    </div>

    <div class="block">
      <input type="hidden" name="redirect" value="
      <input type="submit" name="action" value="login" />
    </div>
    
  </form>
  
    <div class="instructions">
      Don't have a password? 
      <a href="UserPreferences.jsp?tab=profile">Join
      <wiki:Variable var="applicationname" /> now!
    </div>
    <div class="instructions">
      Lost your password? 
      <a href="LostPassword.jsp">Get a new one.
    </div>
</div>

Other jforum examples (source code examples)

Here is a short list of links related to this jforum LoginContent.jsp source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.