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

Struts example source code file (Constants.java)

This example Struts source code file (Constants.java) 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 - Struts tags/keywords

create, delete, edit, edit, error, error, error_database_missing, expired_password_exception, log_database_save_error, string, string, user, user, user_key

The Struts Constants.java source code

/*
 * $Id: Constants.java 471756 2006-11-06 15:01:43Z husted $
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package mailreader2;

/**
 * <p> Manifest constants for the MailReader application. 

*/ public final class Constants { // --- Tokens ---- /** * <p> The token representing a "cancel" request.

*/ public static final String CANCEL = "cancel"; /** * <p> The token representing a "create" task.

*/ public static final String CREATE = "Create"; /** * <p> The application scope attribute under which our user database is * stored. </p> */ public static final String DATABASE_KEY = "database"; /** * <p> The token representing a "edit" task.

*/ public static final String DELETE = "Delete"; /** * <p> The token representing a "edit" task.

*/ public static final String EDIT = "Edit"; /** * <p> The package name for this application.

*/ public static final String PACKAGE = "org.apache.struts.apps.mailreader"; /** * <p> The session scope attribute under which the Subscription object * currently selected by our logged-in User is stored. </p> */ public static final String SUBSCRIPTION_KEY = "subscription"; /** * <p> The session scope attribute under which the User object for the * currently logged in user is stored. </p> */ public static final String USER_KEY = "user"; /** * <p>The token representing the "Host" property. */ public static final String HOST = "host"; // ---- Error Messages ---- /** * <p> * A static message in case message resource is not loaded. * </p> */ public static final String ERROR_MESSAGES_NOT_LOADED = "ERROR: Message resources not loaded -- check servlet container logs for error messages."; /** * <p> * A static message in case database resource is not loaded. * <p> */ public static final String ERROR_DATABASE_NOT_LOADED = "ERROR: User database not loaded -- check servlet container logs for error messages."; /** * <p> * A standard key from the message resources file, to test if it is available. * <p> */ public static final String ERROR_DATABASE_MISSING = "error.database.missing"; /** * <P> * A "magic" username to trigger an ExpiredPasswordException for testing. *</p> */ public static final String EXPIRED_PASSWORD_EXCEPTION = "ExpiredPasswordException"; /** * <p> * Name of field to associate with authentification errors. * <p> */ public static final String PASSWORD_MISMATCH_FIELD = "password"; // ---- Log Messages ---- /** * <p> Message to log if saving a user fails.

*/ public static final String LOG_DATABASE_SAVE_ERROR = " Unexpected error when saving User: "; }

Other Struts examples (source code examples)

Here is a short list of links related to this Struts Constants.java source code file:

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

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 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.