Package javax.servlet

Examples of javax.servlet.ServletContext.log()


                        }
                        continue;
                    }
                } else if (_debug) {
                    ServletContext sc = pageContext.getServletContext();
                    sc.log("i18n:bundle tag requested locale not available: " + locale);
                }
            }

            // bundle should never be null at this point - if the last locale on
            // the list wasn't available, the default locale should have kicked
View Full Code Here


                _bundle = _localeManager.getBundle(_baseName);
            }

            if (_debug) {
                ServletContext sc = pageContext.getServletContext();
                sc.log("i18n:bundle tag debug: bundle (sensed locale) = " + _bundle);
            }

            // if the localeAttribute was provided, but didn't have a value,
            // go ahead and remember the value for next time
            if (_localeAttribute != null) {
View Full Code Here

        _bundle = null;
        findBundle();

        if (_debug) {
            ServletContext sc = pageContext.getServletContext();
            sc.log("i18n:bundle tag debug: basename =" + _baseName);
        }

        // set the bundle as a variable in the page
        if (this.getId() != null) {
            pageContext.setAttribute(this.getId(),_bundle);
View Full Code Here

    protected final void addArg(Object arg)
    {
        _arguments.add(arg);
        if (_debug) {
            ServletContext sc = pageContext.getServletContext();
            sc.log("i18n:message added arg: " + arg.toString());
        }
    }

    /**
     *  allows setting all the arguments at once
View Full Code Here

        // see if the bundle has a value, if not, we default to the tag contents
        try {
            _value = bundle.getString(_key);
            if (_debug) {
                ServletContext sc = pageContext.getServletContext();
                sc.log("i18n:message tag: template for " + _key + " is: " + _value);
            }
        } catch (java.util.MissingResourceException e) {
            ServletContext sc = pageContext.getServletContext();
            sc.log("i18n:message tag, value not found for key:" + _key);
        }
View Full Code Here

                ServletContext sc = pageContext.getServletContext();
                sc.log("i18n:message tag: template for " + _key + " is: " + _value);
            }
        } catch (java.util.MissingResourceException e) {
            ServletContext sc = pageContext.getServletContext();
            sc.log("i18n:message tag, value not found for key:" + _key);
        }

        return EVAL_BODY_TAG;
    }
View Full Code Here

            }

            if ( _value == null) {
                if (_debug) {
                    ServletContext sc = pageContext.getServletContext();
                    sc.log("i18n: message: skipping null value for " + _key);
                }
            } else if (id != null) {
                // define the variable in the page context
                pageContext.setAttribute(id,_value);
            } else {
View Full Code Here

     *
     * @param e the exception which was thrown
     */
    protected void doUnexpectedFailure(Throwable e) {
        ServletContext servletContext = getServletContext();
        servletContext.log("Exception while dispatching incoming RPC call", e);

        // Send GENERIC_FAILURE_MSG with 500 status.
        //
        respondWithFailure(getThreadLocalResponse());
    }
View Full Code Here

        _aliases=getInitBoolean("aliases",_aliases);

        if (!_aliases && !FileResource.getCheckAliases())
            throw new IllegalStateException("Alias checking disabled");
        if (_aliases)
            config.log("Aliases are enabled");
       
        _useFileMappedBuffer=getInitBoolean("useFileMappedBuffer",_useFileMappedBuffer);
       
        String rrb = getInitParameter("relativeResourceBase");
        if (rrb!=null)
View Full Code Here

  }

  private void logException(String msg, Exception e,
      HttpServletResponse response) {
    ServletContext servletContext = getServletContext();
    servletContext.log(msg, e);
    response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.