Package common.util

Examples of common.util.StaticLog


    public void service ( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {

        PrintWriter out = response.getWriter();
        out.println( "In HttpSessionValueUnBoundTest servlet<BR>" );

        StaticLog sl = new StaticLog();

        sl.resetLog();

        HttpSession session = request.getSession( true );

        HSBindingListener hsbl = new HSBindingListener();
        session.setAttribute( "HttpSessionBindingListenerValueUnBound", hsbl );
        session.removeAttribute( "HttpSessionBindingListenerValueUnBound" );

        Enumeration result = sl.readFromLog();

        while ( result.hasMoreElements() ) {
            String tmp = ( String ) result.nextElement();
            out.println( tmp );
        }
View Full Code Here


        PrintWriter out = response.getWriter();

        out.println( "In ServletContextAttributeEventConstructorTest servlet<BR>" );

        StaticLog sl = new StaticLog();

        sl.resetLog();

        ServletConfig config = this.getServletConfig();
        ServletContext context = config.getServletContext();

        ServletContextAttributeEvent scae = null;
View Full Code Here

        PrintWriter out = response.getWriter();

        out.println( "In ServletContextAttributeAddedEventTest servlet<BR>" );

        StaticLog sl = new StaticLog();

        sl.resetLog();

        ServletConfig config = this.getServletConfig();
        ServletContext context = config.getServletContext();
        context.setAttribute( "ServletContextAttributeEventAddedTest", "Attribute1" );


        Enumeration result = sl.readFromLog();

        while ( result.hasMoreElements() ) {
            out.println( result.nextElement() );
        }
        context.removeAttribute( "ServletContextAttributeEventAddedTest" );
View Full Code Here

    public void service ( ServletRequest request, ServletResponse response ) throws ServletException, IOException {

        PrintWriter out = response.getWriter();
        out.println( "In ServletContextAttributeReplacedEventTest servlet<BR>" );

        StaticLog sl = new StaticLog();

        sl.resetLog();

        ServletConfig config = this.getServletConfig();
        ServletContext context = config.getServletContext();
        context.setAttribute( "ServletContextAttributeEventReplacedTest", "Attribute1" );
        context.setAttribute( "ServletContextAttributeEventReplacedTest", "Attribute2" );

        Enumeration result = sl.readFromLog();

        while ( result.hasMoreElements() ) {
            out.println( result.nextElement() );
        }
        context.removeAttribute( "ServletContextAttributeEventReplacedTest" );
View Full Code Here

    public void service ( ServletRequest request, ServletResponse response ) throws ServletException, IOException {

        PrintWriter out = response.getWriter();
        out.println( "In ServletContextAttributeRemovedEventTest servlet<BR>" );

        StaticLog sl = new StaticLog();

        sl.resetLog();

        ServletConfig config = this.getServletConfig();
        ServletContext context = config.getServletContext();
        context.setAttribute( "ServletContextAttributeEventRemovedTest", "Attribute1" );
        context.removeAttribute( "ServletContextAttributeEventRemovedTest" );


        Enumeration result = sl.readFromLog();

        while ( result.hasMoreElements() ) {
            out.println( result.nextElement() );
        }
    }
View Full Code Here

TOP

Related Classes of common.util.StaticLog

Copyright © 2018 www.massapicom. 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.