Package common.util

Examples of common.util.StaticLog


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

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

        StaticLog sl = new StaticLog();

        sl.resetLog();

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

        Enumeration result = sl.readFromLog();

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


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

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

        StaticLog sl = new StaticLog();

        sl.resetLog();

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

        Enumeration result = sl.readFromLog();

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

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

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

        StaticLog sl = new StaticLog();

        sl.resetLog();

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

        Enumeration result = sl.readFromLog();

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

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

        // get access to StaticLog
        // this line will be replaced
        StaticLog sl = new StaticLog();

        sl.resetLog();

        HttpSession session = request.getSession( true );

        session.setAttribute( "HttpSessionAttributeListenerAddedTest", "Attribute1" );

        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 HttpSessionAttributeRemovedTest servlet<BR>" );

        // get access to StaticLog
        // this line will be replaced
        StaticLog sl = new StaticLog();

        sl.resetLog();

        HttpSession session = request.getSession( true );
        session.setAttribute( "HttpSessionAttributeListenerRemovedTest", "Attribute1" );
        session.removeAttribute( "HttpSessionAttributeListenerRemovedTest" );

        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 HttpSessionAttributeReplacedTest servlet<BR>" );

        // get access to StaticLog
        // this line will be replaced
        StaticLog sl = new StaticLog();

        sl.resetLog();

        HttpSession session = request.getSession( true );
        session.setAttribute( "HttpSessionAttributeListenerReplacedTest", "Attribute1" );
        session.setAttribute( "HttpSessionAttributeListenerReplacedTest", "Attribute2" );

        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 HttpSessionBindingEventAddedTest servlet<BR>" );

        // get access to StaticLog
        // this line will be replaced
        StaticLog sl = new StaticLog();

        sl.resetLog();

        HttpSession session = request.getSession( true );

        session.setAttribute( "HttpSessionBindingEventAddedTest", "Attribute1" );

        String searchString = "The session that changed is=";
        String sessionId = session.getId();

        Enumeration result = sl.readFromLog();

        while ( result.hasMoreElements() ) {
            String tmp = ( String ) result.nextElement();

            // find the session id string
View Full Code Here

        PrintWriter out = response.getWriter();
        out.println( "In HttpSessionBindingEventRemovedTest servlet<BR>" );
        // get access to StaticLog
        // this line will be replaced
        StaticLog sl = new StaticLog();

        sl.resetLog();

        HttpSession session = request.getSession( true );

        session.setAttribute( "HttpSessionBindingEventRemovedTest", "Attribute1" );
        session.removeAttribute( "HttpSessionBindingEventRemovedTest" );

        String sessionId = session.getId();
        String searchString = "The session that changed is=";

        Enumeration result = sl.readFromLog();

        while ( result.hasMoreElements() ) {
            String tmp = ( String ) result.nextElement();

            // find the session id string
View Full Code Here

        PrintWriter out = response.getWriter();
        out.println( "In HttpSessionBindingEventReplacedTest servlet<BR>" );
        // get access to StaticLog
        // this line will be replaced
        StaticLog sl = new StaticLog();

        sl.resetLog();

        HttpSession session = request.getSession( true );

        session.setAttribute( "HttpSessionBindingEventReplacedTest", "Attribute1" );
        session.setAttribute( "HttpSessionBindingEventReplacedTest", "Attribute2" );

        String sessionId = session.getId();
        String searchString = "The session that changed is=";

        Enumeration result = sl.readFromLog();

        while ( result.hasMoreElements() ) {
            String tmp = ( String ) result.nextElement();

            // find the session id string
View Full Code Here

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

        // get access to StaticLog
        // this line will be replaced
        StaticLog sl = new StaticLog();

        sl.resetLog();

        HttpSession session = request.getSession( true );

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

        Enumeration result = sl.readFromLog();

        while ( result.hasMoreElements() ) {
            String tmp = ( String ) result.nextElement();
            out.println( tmp );
        }
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.