/* * 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 org.apache.catalina.manager;
/** * Helper JavaBean for JSPs, because JSTL 1.1/EL 2.0 is too dumb to to what I need (call methods with parameters), or I * am too dumb to use it correctly. :) * * @author Cédrik LIME
*/ publicclass JspHelper {
/** * Public constructor, so that this class can be considered a JavaBean
*/ private JspHelper() { super();
}
/** * Try to get user locale from the session, if possible. * <p> * IMPLEMENTATION NOTE: this method has explicit support for Tapestry 3 and Struts 1.x * * @param in_session Session from which the locale should be guessed * * @return String
*/ publicstatic String guessDisplayLocaleFromSession(Session in_session) { return localeToString(SessionUtils.guessLocaleFromSession(in_session));
}
/** * Try to get user name from the session, if possible. * * @param in_session The Servlet session * * @return the user name
*/ publicstatic String guessDisplayUserFromSession(Session in_session) {
Object user = SessionUtils.guessUserFromSession(in_session); return escapeXml(user);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.