Filter chain behaviour on browser disconnection

Hi
I'm trying to implement a filter that acts as a work queue. Here's the code I use in my filter:
// push a new worker to the queue, the queue will wait() if there are already enough active workers.
queue.push(this);
// out of the queue, let the chain process the request
chain.doFilter(request, response);
// inform queue that the current worker is done and the next queued worker can be released
queue.pop();
The code works fine with normal user activity, but if the user disconnects the page (presses stop or browses another link), the processing doesn't reach queue.pop(). I would like to somehow get information relayed to queue or filter that that "the browser disconnected", but I'm not sure if this possible.
From previous threads in this forum I just found techniques which used the browser to launch some event, but those aren't suitable in this case.
The only approach I've figured out would be to use a leaky queue implementation. The queue would leak a worker periodically if no workers have been released after a specified time. I'd definitely appreciate better solutions =)
I'm using the Orion application server 1.6.0b.

Hi
Yes, it works even when the browser is fully disconnected (I verified this from the firewall's connections). The filter doesn't intercept the disconnection, but instead it's guaranteed that the page gets fully rendered.
Currently I use the following approach:
1. try/catch around chain.doFilter(request, response); to catch any thrown exceptions in the filter chain or while page was rendered. The worker is released from the queue when the execution of the code gets back from doFilter() and any recieved exceptions are thrown upwards.
2. Leaky queue, which leaks workers if the above doesn't work for some reason
3. Since there might be other worker queues in use while rendering the page (which need to be freed in case of an error), they're stored to a Vector in request's context. Normally they're released after use, but if there's an error the error gets caught in 1. and there the vector is iterated releasing all work queues.

Similar Messages

  • Forward in filter chain

    Hi,
    i have a question to the behaviour of a filter chain.
    Assumed i have a chain of 3 filters and at filter 2 there is a forward on request to a different url.
    Wath is the next action?
    1) New url will be processed with filters 1,2,3.
    2) New url will be processed with filter 3
    3) the filter chain will be abborted
    Thanks for answers Thomas

    well it depends if you dont call doFilter() but redirect to a redirect on the same server with the same mapping your current filterChain will be aborted but you will start a new one on the forwarded URL

  • How to filter tables in table browser in designer

    Hello Experts,
    I had a direct connection to SAP ECC database and I want to create an universe (with designer) on top of a database table. Problem is that ECC have a lot of tables and is very time consuming the selection of tables in table browser, question is:
    is there a way to filter tables or to directly select a table provided I know the table name I want to work with?
    note: I want to use aggregate data from logistic information tables because there is no BW system in this landscape
    thank you
    Edited by: Garduño Azael on Jul 29, 2011 6:12 PM

    Hi,
    You should use the external strategy function of the designer (see chapter OPTIMIZING UNIVERSES -> USING EXTERNAL STRATEGIES TO CUSTOMIZE UNIVERSE CREATION)
    http://help.sap.com/businessobject/product_guides/boexir31/en/xi31_designer_en.pdf
    you don't need to create a new external strategy. Designer comes with a set of "standard" external strategies. 
    For filtering tables use "table strategy".
    In order to make it to work for your environment, check the file *.STG and see which db user is used in the delivered strategy, then, add this user to your RDBMS and set the permissions and tables you wish to select to in designer
    For example in my BO installation the user is named 'USER', so I added it to my DB2 RDBMS of sapecc and added the required tables
    hope it helps

  • Premerie pro CC Media Browser disconnects

    My media browser is disconnecting from my current folder everytime i save a project. I then have to re-select the media folder and wait for the assests to load. ???

    Hi Mark,
    Can you please file a bug report? http://www.adobe.com/go/wish
    Thanks,
    Kevin

  • Behaviour open browser window

    basically what i´m trying to do is to map part
    of an image so when clicking on it a small browser window opens.
    i´ve read the using dremawaver help but.. didn´t help me.
    have googled it but still can´t get it to work. i´m not
    sure exactly what to do, do I save a file first and then give it
    the behaviour? do i link this file to the mapped image? well,
    obviously that´s not the way its done cause it is not
    working...
    if anyone could give me just the steps from the moment i map
    the image to the moment when i press f12 and !voila! a browser
    window opens, I would be more than happy and appreciative. Thanx so
    much in advance.

    plinares wrote:
    >
    basically what i?m trying to do is to map part of an
    image so when
    > clicking on it a small browser window opens. i?ve read
    the using dremawaver
    > help but.. didn?t help me. have googled it but still
    can?t get it to work. i?m
    > not sure exactly what to do, do I save a file first and
    then give it the
    > behaviour? do i link this file to the mapped image?
    well, obviously that?s not
    > the way its done cause it is not working...
    >
    > if anyone could give me just the steps from the moment i
    map the image to the
    > moment when i press f12 and !voila! a browser window
    opens, I would be more
    > than happy and appreciative. Thanx so much in advance.
    >
    select the image-map.
    In the property inspector, in the link box, write
    javascript:;
    Open the behavior panel. Click on the + sign. Select "Open
    Browser Window". follow the steps.
    When you have applied the behavior, look in your behavior
    panel, your behavior should show.
    (note that ALL this time, your image map is still selected)
    Next to the shown behavior, you see the action that triggers
    it; it's a drop-down select menu.
    Select onClick.
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    Downloads: Slide Show, Directory Browser, Mailing List

  • Behaviours, open browser window

    hi,
    have an annoying problem using the "open browser window"
    Behaviour. Basically whats happening is that i put up a page of
    photos that i have reduced in size, users then click on a photo
    that they want to see. Using the "open browser window" a new page
    appears with the enlarged photo on it. The problem is this, if
    users scroll down my webpage and select a photo, the new window
    opens no prob but when they return to the original previewing page
    it has returned to the top of the page again. The use then has to
    scroll back down to where they left off! this is very annoying for
    me and them. HOW DO I FIX?
    here is the page im question so you can see for yourself
    http://www.vas-ni.com/spares%20gallery.html
    i am using Dreamweaver 8. I create hotspots then assign
    behaviours to them..
    thanks

    Change this -
    <area shape="rect" coords="3,3,101,76" href="#"
    onclick="MM_openBrWindow('web
    pages/15.html','','width=400,height=300')" />
    to this -
    <area shape="rect" coords="3,3,101,76" href="#"
    onclick="MM_openBrWindow('web
    pages/15.html','','width=400,height=300');return false;"
    />
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "ncaskey" <[email protected]> wrote in
    message
    news:e3t6n0$5fo$[email protected]..
    > hi,
    >
    > have an annoying problem using the "open browser window"
    Behaviour.
    > Basically
    > whats happening is that i put up a page of photos that i
    have reduced in
    > size,
    > users then click on a photo that they want to see. Using
    the "open
    > browser
    > window" a new page appears with the enlarged photo on
    it. The problem is
    > this,
    > if users scroll down my webpage and select a photo, the
    new window opens
    > no
    > prob but when they return to the original previewing
    page it has returned
    > to
    > the top of the page again. The use then has to scroll
    back down to where
    > they
    > left off! this is very annoying for me and them. HOW DO
    I FIX?
    >
    > here is the page im question so you can see for yourself
    >
    http://www.vas-ni.com/spares%20gallery.html
    >
    > i am using Dreamweaver 8. I create hotspots then assign
    behaviours to
    > them..
    >
    > thanks
    >
    >

  • JRun4 Filter Chain problem

    Hi,
    I try to use servlet.Filter in my web app. the Filter works
    fine in Tomcat. but when i deployed it to JRun4(update6), JRun gave
    me this error message as below.
    I tried to google it in the internet, but couldn't find
    anything related to this problem. Please can someone help me?
    Thanks in advance.
    oneduan
    500
    jrun.servlet.JRunInvokerChain
    java.lang.ClassCastException: jrun.servlet.JRunInvokerChain
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:85)
    at myTest.SessionFilter.doFilter(SessionFilter.java:140)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
    at jrun.servlet.FilterChain.service(FilterChain.java:101)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:534)
    at
    jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java:503)
    at
    jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:177)
    at
    jrun.servlet.file.FileServlet.service(FileServlet.java:316)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
    at myTest.SessionFilter.doFilter(SessionFilter.java:62)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
    at jrun.servlet.FilterChain.service(FilterChain.java:101)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
    at
    jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    ------------------------------------------------------------------------------------------ -------------------------------------

    I find another error message from JRun launcher console.
    ERROR: Translator.CompilationFailedExceptionCompiler
    errors:Note: C:\JRun4\serve
    rs\default\SERVER-INF\temp\dwadj.war-1227002279\07/04
    13:34:39 error jrun.servle
    t.JRunInvokerChain
    java.lang.ClassCastException: jrun.servlet.JRunInvokerChain
    at jrun.servleWEB-INF\jsp\jrun__jsp__index2ejspe.java uses or
    overrides
    a deprecated API.
    Note: Recompile with -Xlint
    eprecation for details.t.FilterChain.doFilter(Filte
    rChain.java:85)
    at myTest.SessionFilter.doFilter(
    SessionFil
    ter.java:140)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
    at jrun.servlet.FilterChain.service(FilterChain.java:101)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.j
    ava:534)
    at
    jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatche
    r.java:503)
    at
    jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java
    :177)
    at
    jrun.servlet.file.FileServlet.service(FileServlet.java:316)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
    at myTest.SessionFilter.doFilter(
    SessionFilter.java:62)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
    at jrun.servlet.FilterChain.service(FilterChain.java:101)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:
    259)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:
    541)
    at
    jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo
    l.java:320)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j
    ava:428)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.
    java:266)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

  • Aperture 2.01 - no tabs, no filter display in browser mode

    After upgrading to 2.01 from 2 I lost the tabs at the top of the inspector and the filter dialogue box in browser mode. Threw away the preferences and now everything is back to normal.

    try here:
    User>>Library>>Preferences>>com.apple.Aperture.plist
    DLS

  • BAM - Acrive Studio - Browser Error in filter

    In Acrive Studio (BAM 11g) I must create a graphic on specific value of BI
    But when I click on "filter" I have an browser error and I show blank area.
    The error is :
    Messaggio: Previsto ';'
    Linea: 50
    Carattere: 85
    Codice: 0
    URI: http://atenei02.private.cineca.it:7052/OracleBAM/8533/activestudio/default.jsp
    Messaggio: 'g_strFilterNodeName' non è definito
    Linea: 61
    Carattere: 2
    Codice: 0
    URI: http://atenei02.private.cineca.it:7052/OracleBAM/8533/shared/scripts/filtereditor/Filter.htc
    Someone can help me ...
    Thanks
    Elena

    Hi Luciano,
    I explain you
    In BAM --> Active Studio --> Create new report --> select data object (setp 1) --> select data object fields ( step2)
    --> Other function ( step 3) --> create filter.
    Now , when I select "create filter" in the bottom bar of the browser show a warning simbol (!) and read "End". If I see the detail of the warning :
    Dettagli errore pagina Web
    Messaggio: Previsto ';'
    Linea: 50
    Carattere: 85
    Codice: 0
    URI: http://<server_url>/OracleBAM/8533/activestudio/default.jsp
    Messaggio: 'g_strFilterNodeName' non è definito
    Linea: 61
    Carattere: 2
    Codice: 0
    URI: http://<server_url>/OracleBAM/8533/shared/scripts/filtereditor/Filter.htc
    I can not select any option, I just delete and start over.
    In this way, I can not define the filters for graphics
    Thanks
    Elena
    P.S: Sorry for the late reply

  • LR3: New filter behaviour conflicts with quick collection

    Going to the Quick collection (Ctrl +B) resets the filters, so when returning back to where I was before (Ctrl + B again), I don't see the same view.
    This cannot be avoided with locking the filters -> then the filters are used for the Quick colelction and often I see nothing in there or only some of the photos. So, could the Quick collection be an exception to the new filter resetting behaviour? (i.e. separate filters for QC? Or no filters for QC?)
    Thanks,
    Vit

    Hi,
    The LR Print Module is working as it was designed to work - the Custom Package option will allow you to perform the actions that you require, but not automatically.
    Why not place your request for added funtionality (i.e. add an option to allow automatic population of the Custom Print Package layout) on the Feature Request forum below;
    http://forums.adobe.com/community/lightroom/lightroom_feature_requests?view=discussions

  • Strange behavior when using servlet filter with simple index.htm

    I am new to J2EE development so please tolerate my ignorance. I have a web application that starts with a simple index.htm file. I am using a servlet filter throughout the website to check for session timeout, redirecting the user to a session expiration page if the session has timed out. When I do something as simple as loading the index.htm page in the browser, the .css file and one image file that are associated, or referenced in the file are somehow corrupted and not being rendered. How do I get the filter to ignore css and image files??? Thank you!!
    The servlet filter:
    import java.io.IOException;
    import javax.servlet.Filter;
    import javax.servlet.FilterChain;
    import javax.servlet.FilterConfig;
    import javax.servlet.ServletException;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class SessionTimeoutFilter implements Filter {
         String[] excludedPages = {"SessionExpired.jsp","index.htm","index.jsp"};
         String timeoutPage = "SessionExpired.jsp";
         public void destroy() {
         public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
              if ((request instanceof HttpServletRequest) && (response instanceof HttpServletResponse)) {
                   HttpServletRequest httpServletRequest = (HttpServletRequest) request;
                   HttpServletResponse httpServletResponse = (HttpServletResponse) response;
                   //httpServletResponse.setHeader("Cache-Control","no-cache");
                   //httpServletResponse.setHeader("Pragma","no-cache");
                   //httpServletResponse.setDateHeader ("Expires", 0);
                   String requestPath = httpServletRequest.getRequestURI();
                   boolean sessionInvalid = httpServletRequest.getSession().getAttribute("loginFlag") != "loggedIn";               
                   System.out.println(sessionInvalid);
                   boolean requestExcluded = false;
                   System.out.println(requestExcluded);
                   for (int i=0;i<excludedPages.length;i++){
                        if(requestPath.contains(excludedPages)){
                             requestExcluded = true;
                   if (sessionInvalid && !requestExcluded){
                        System.out.println("redirecting");
                        httpServletResponse.sendRedirect(timeoutPage);
              // pass the request along the filter chain
              chain.doFilter(request, response);
         public void init(FilterConfig arg0) throws ServletException {
              //System.out.println(arg0.getInitParameter("test-param"));
    The index.htm file (or the relevant portion)<HTML>
    <Head>
    <META http-equiv="Content-Style-Type" content="text/css">
    <LINK href="RTEStyleSheet.css" rel="stylesheet" type="text/css">
    <TITLE>Login</TITLE>
    </HEAD>
    <BODY>
    <FORM NAME="Login" METHOD="POST" ACTION="rte.ServletLDAP"><!-- Branding information -->
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
         <tr>
              <td width="30%" align="left"><img src="images/top_logo_new2.gif">
              </td>
              <td width="37%" align="center"></td>
              <td width="33%" align="right"></td>
         </tr>
    </table>
    My web.xml entry for the filter:     <filter>
              <description>
              Checks for a session timeout on each user request, redirects to logout if the session has expired.</description>
              <display-name>
              SessionTimeoutFilter</display-name>
              <filter-name>SessionTimeoutFilter</filter-name>
              <filter-class>SessionTimeoutFilter</filter-class>
              <init-param>
                   <param-name>test-param</param-name>
                   <param-value>this is a test parameter</param-value>
              </init-param>
         </filter>
         <filter-mapping>
              <filter-name>SessionTimeoutFilter</filter-name>
              <url-pattern>/*</url-pattern>
              <dispatcher>REQUEST</dispatcher>
              <dispatcher>FORWARD</dispatcher>
         </filter-mapping>

    Hi,
    Try adding CSS files and images to the excluded Pages.

  • Filter does not work with *.jsp URL pattern???

    Hi All,
    I am, by no means, very good at JSF or Java. I have looked at various forum posts on here for ways to implement a security filter to intercept requests to pages that first require one to be logged in, and if not, redirect them to the login page. Yes, I know a lot of you have heard this many times before, and I'm sorry to bring it up again.
    BUT, from the guidance of other posts, I have got a filter that works fine when the url pattern is set to "/faces/*" or "/<anything>/*", however it won't work for "*.jsp" or "*.<anything>"
    My filter is as follows:
    package test.security;
    import javax.faces.context.FacesContext;
    import javax.servlet.Filter;
    import javax.servlet.FilterChain;
    import javax.servlet.FilterConfig;
    import javax.servlet.http.HttpSession;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class SecurityFilter implements Filter{
        /** Creates a new instance of SecurityFilter */
        private final static String FILTER_APPLIED = "_security_filter_applied";
        public SecurityFilter() {
        public void init(FilterConfig filterConfig) {
        public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws java.io.IOException, ServletException{
            HttpServletRequest req = (HttpServletRequest)request;
            HttpServletResponse res = (HttpServletResponse)response;
            HttpSession session = req.getSession();
            String requestedPage = req.getPathTranslated();
            String user=null;
            if(request.getAttribute(FILTER_APPLIED) == null) {
                //check if the page requested is the login page or register page
                if((!requestedPage.endsWith("Page1.jsp")) /* This is the login page */
                    //set the FILTER_APPLIED attribute to true
                    request.setAttribute(FILTER_APPLIED, Boolean.TRUE);
                    //Check that the session bean is not null and get the session bean property username.
                    if(((test.SessionBean1)session.getAttribute("SessionBean1"))!=null) {
                        user = ((test.SessionBean1)session.getAttribute("SessionBean1")).getUsername();
                    if((user==null)||(user.equals(""))) {
                       // try {
                     //       FacesContext.getCurrentInstance().getExternalContext().redirect("Page1.jsp");
                      //  } catch (ServletException ex) {
                      //      log("Error Description", ex);
                        res.sendRedirect("../Page1.jsp");
                        return;
            //deliver request to next filter
            chain.doFilter(request, response);
        public void destroy(){
    }My web.xml declaration for the filter is:
    <filter>
      <description>Filter to check whether user is logged in.</description>
      <filter-name>SecurityFilter</filter-name>
      <filter-class>test.security</filter-class>
    </filter>
    <filter-mapping>
      <filter-name>SecurityFilter</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    Note: I have also tried this with <url-pattern>*.jsp</url-pattern> for the filter mapping in place of the Faces Servlet
    My web.xml declaration for the url pattern is:
    <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsp</url-pattern>
    </servlet-mapping>Which JSC/NetbeansVWP automatically creates a "JSCreator_index.jsp" which has:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root  version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page">
      <jsp:forward page="Page1.jsp"/>
    </jsp:root>When run, this causes an Error 500 in the browser and a NullPointerException in SecurityFilter.java on the line:
    if((!requestedPage.endsWith("Page1.jsp")) /* This is the login page */I think I'm missing something that would be obvious to anyone who knows better than me. Any ideas?

    Dear Ginger and Boris,
    thanks for the information - the problem seems to ocur in EP7 as well, Boris told me it is fixed in SP15. We are on SP14 now, so there is hope !
    actually the information in the oss note stated above is also true, as we have an Oracle DB. On a similar demo system (only difference is SQL DB) the hyphen search works !
    best regards, thank you !
    Johannes

  • SMPlayer vs. Mplayer - behaviour after resuming a pause

    For a few weeks I've been experiencing a change in SMPlayer behaviour after resuming a pause of playing a video - motion of the video is jerked for a few seconds. However, I don't experience this with MPlayer. Has anybody else noticed this or does anybody know what could I do to make SMPlayer work normally?

    I've turned an extended log of MPlayer on and so these are logs created during a short play with some pauses (with jerked motions after resuming):
    SMPlayer log (just extract, couldn't copy the whole log, but it doesn't seem to contain something relevant):
    [22:40:33:653] Core::pause
    [22:40:33:653] Core::pause: current state: Playing
    [22:40:33:653] Core::tellmp: 'pause'
    [22:40:33:707] MplayerProcess::parseLine: ''
    [22:40:33:707] MplayerProcess::parseLine: ' ===== PAUSE ====='
    [22:40:33:708] MplayerProcess::parseLine: ''
    [22:40:33:708] MplayerProcess::parseLine: 'ID_PAUSED'
    [22:40:33:708] Core::changePause
    [22:40:33:708] Core::changePause: mplayer reports that it's paused
    [22:40:33:708] BaseGui::displayState: Paused
    [22:40:33:708] BaseGui::togglePlayAction
    [22:40:33:709] BaseGui::checkStayOnTop
    [22:40:35:104] Core::pause
    [22:40:35:104] Core::pause: current state: Paused
    [22:40:35:104] Core::tellmp: 'pause'
    [22:40:35:143] BaseGui::displayState: Playing
    [22:40:35:143] BaseGui::togglePlayAction
    [22:40:35:144] Core::changeCurrentSec: mplayer reports that now it's playing
    [22:40:35:147] BaseGui::checkStayOnTop
    [22:40:38:432] Core::pause
    [22:40:38:432] Core::pause: current state: Playing
    [22:40:38:432] Core::tellmp: 'pause'
    [22:40:38:507] MplayerProcess::parseLine: ''
    [22:40:38:508] MplayerProcess::parseLine: ' ===== PAUSE ====='
    [22:40:38:508] MplayerProcess::parseLine: ''
    [22:40:38:508] MplayerProcess::parseLine: 'ID_PAUSED'
    [22:40:38:508] Core::changePause
    [22:40:38:508] Core::changePause: mplayer reports that it's paused
    [22:40:38:508] BaseGui::displayState: Paused
    [22:40:38:509] BaseGui::togglePlayAction
    [22:40:38:509] BaseGui::checkStayOnTop
    [22:40:42:012] BaseGui::showMplayerLog
    [22:40:56:875] BaseGui::showLog
    MPlayer log (I've cut out a long list of subtitles' lines):
    /usr/bin/mplayer -noquiet -v -nofs -nomouseinput -sub-fuzziness 1 -identify -slave -vo xv:adaptor=0 -ao alsa -nokeepaspect -framedrop -autosync 100 -nodr -nodouble -input nodefault-bindings:conf=/dev/null -stop-xscreensaver -wid 52429143 -monitorpixelaspect 1 -ass -embeddedfonts -ass-line-spacing 0 -ass-font-scale 1 -ass-styles /home/ondra/.config/smplayer/styles.ass -fontconfig -font Arial -subfont-autoscale 0 -subfont-osd-scale 20 -subfont-text-scale 20 -subcp CP1250 -vid 0 -aid 2 -sub /home/ondra/Plocha/Poirot - S12E02 - The Clocks - ENG.srt -subpos 100 -volume 32 -nocache -ss 417 -osdlevel 0 -idx -vf-add ass -vf-add screenshot -slices -channels 2 -af scaletempo,equalizer=0:0:0:0:0:0:0:0:0:0 -softvol -softvol-max 100 /mnt/ubuntu/home/sdilene/Hercule.Poirot.S12E01.Hodiny.DVDRip.XviD.cz.en-iNG.avi
    MPlayer SVN-r32492-4.5.1 (C) 2000-2010 MPlayer Team
    CPU vendor name: GenuineIntel max cpuid level: 2
    CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (Family: 15, Model: 2, Stepping: 7)
    extended cpuid-level: 4
    Detected cache-line size is 64 bytes
    Testing OS support for SSE... yes.
    Tests of OS support for SSE passed.
    CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSSE3: 0
    Compiled with runtime CPU detection.
    get_path('codecs.conf') -> '/home/ondra/.mplayer/codecs.conf'
    Reading /home/ondra/.mplayer/codecs.conf: Can't open '/home/ondra/.mplayer/codecs.conf': No such file or directory
    Reading /etc/mplayer/codecs.conf: 159 audio & 349 video codecs
    init_freetype
    Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
    get_path('fonts') -> '/home/ondra/.mplayer/fonts'
    Configuration: --prefix=/usr --enable-runtime-cpudetection --disable-gui --disable-arts --disable-liblzo --disable-speex --disable-openal --disable-fribidi --disable-libdv --disable-musepack --disable-esd --disable-mga --enable-xvmc --language=all --confdir=/etc/mplayer
    CommandLine: '-noquiet' '-v' '-nofs' '-nomouseinput' '-sub-fuzziness' '1' '-identify' '-slave' '-vo' 'xv:adaptor=0' '-ao' 'alsa' '-nokeepaspect' '-framedrop' '-autosync' '100' '-nodr' '-nodouble' '-input' 'nodefault-bindings:conf=/dev/null' '-stop-xscreensaver' '-wid' '52429143' '-monitorpixelaspect' '1' '-ass' '-embeddedfonts' '-ass-line-spacing' '0' '-ass-font-scale' '1' '-ass-styles' '/home/ondra/.config/smplayer/styles.ass' '-fontconfig' '-font' 'Arial' '-subfont-autoscale' '0' '-subfont-osd-scale' '20' '-subfont-text-scale' '20' '-subcp' 'CP1250' '-vid' '0' '-aid' '2' '-sub' '/home/ondra/Plocha/Poirot - S12E02 - The Clocks - ENG.srt' '-subpos' '100' '-volume' '32' '-nocache' '-ss' '417' '-osdlevel' '0' '-idx' '-vf-add' 'ass' '-vf-add' 'screenshot' '-slices' '-channels' '2' '-af' 'scaletempo,equalizer=0:0:0:0:0:0:0:0:0:0' '-softvol' '-softvol-max' '100' '/mnt/ubuntu/home/sdilene/Hercule.Poirot.S12E01.Hodiny.DVDRip.XviD.cz.en-iNG.avi'
    Using nanosleep() timing
    Terminal type `unknown' is not defined.
    Parsing input config file /dev/null
    Input config file /dev/null parsed: 0 binds
    Setting up LIRC support...
    mplayer: could not connect to socket
    mplayer: No such file or directory
    Failed to open LIRC support. You will not be able to use your remote control.
    get_path('Hercule.Poirot.S12E01.Hodiny.DVDRip.XviD.cz.en-iNG.avi.conf') -> '/home/ondra/.mplayer/Hercule.Poirot.S12E01.Hodiny.DVDRip.XviD.cz.en-iNG.avi.conf'
    Playing /mnt/ubuntu/home/sdilene/Hercule.Poirot.S12E01.Hodiny.DVDRip.XviD.cz.en-iNG.avi.
    get_path('sub/') -> '/home/ondra/.mplayer/sub/'
    [file] File size is 821880832 bytes
    STREAM: [file] /mnt/ubuntu/home/sdilene/Hercule.Poirot.S12E01.Hodiny.DVDRip.XviD.cz.en-iNG.avi
    STREAM: Description: File
    STREAM: Author: Albeu
    STREAM: Comment: based on the code from ??? (probably Arpi)
    LAVF_check: AVI format
    AVI file format detected.
    list_end=0x3324
    ======= AVI Header =======
    us/frame: 40000 (fps=25.000)
    max bytes/sec: 0
    padding: 0
    MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
    frames total: 133641 initial: 0
    streams: 3
    Suggested BufferSize: 0
    Size: 640 x 368
    ==========================
    list_end=0x10F4
    ==> Found video stream: 0
    ID_VIDEO_ID=0
    [aviheader] Video stream found, -vid 0
    ====== STREAM Header =====
    Type: vids FCC: xvid (64697678)
    Flags: 0
    Priority: 0 Language: 0
    InitialFrames: 0
    Rate: 25/1 = 25.000
    Start: 0 Len: 133641
    Suggested BufferSize: 125416
    Quality 10000
    Sample size: 0
    ==========================
    Found 'bih', 40 bytes of 40
    ======= VIDEO Format ======
    biSize 40
    biWidth 640
    biHeight 368
    biPlanes 1
    biBitCount 24
    biCompression 1145656920='XVID'
    biSizeImage 1413120
    ===========================
    Regenerating keyframe table for MPEG-4 video.
    list_end=0x2186
    ==> Found audio stream: 1
    ID_AUDIO_ID=1
    [aviheader] Audio stream found, -aid 1
    ====== STREAM Header =====
    Type: auds FCC: (0)
    Flags: 0
    Priority: 0 Language: 0
    InitialFrames: 1
    Rate: 16000/384 = 41.667
    Start: 0 Len: 222719
    Suggested BufferSize: 8064
    Quality -1
    Sample size: 384
    ==========================
    Found 'wf', 30 bytes of 18
    ======= WAVE Format =======
    Format Tag: 85 (0x55)
    Channels: 2
    Samplerate: 48000
    avg byte/sec: 16000
    Block align: 384
    bits/sample: 0
    cbSize: 12
    mp3.wID=1
    mp3.fdwFlags=0x2
    mp3.nBlockSize=384
    mp3.nFramesPerBlock=1
    mp3.nCodecDelay=0
    ==========================================================================
    list_end=0x3218
    ==> Found audio stream: 2
    ID_AUDIO_ID=2
    [aviheader] Audio stream found, -aid 2
    ====== STREAM Header =====
    Type: auds FCC: (0)
    Flags: 0
    Priority: 0 Language: 0
    InitialFrames: 1
    Rate: 16000/384 = 41.667
    Start: 0 Len: 222735
    Suggested BufferSize: 8064
    Quality -1
    Sample size: 384
    ==========================
    Found 'wf', 30 bytes of 18
    ======= WAVE Format =======
    Format Tag: 85 (0x55)
    Channels: 2
    Samplerate: 48000
    avg byte/sec: 16000
    Block align: 384
    bits/sample: 0
    cbSize: 12
    mp3.wID=1
    mp3.fdwFlags=0x2
    mp3.nBlockSize=384
    mp3.nFramesPerBlock=1
    mp3.nCodecDelay=0
    ==========================================================================
    list_end=0x3324
    AVI: dmlh found (size=248) (total_frames=133641)
    list_end=0x3364
    hdr=Software size=43
    Software : VirtualDubMod 1.5.4.1 (build 2066/release)
    list_end=0x309B07A2
    Found movie at 0x380C - 0x309B07A2
    Reading INDEX block, 400890 chunks for 133641 frames (fpos=815466410).
    AVI index offset: 0x3808 (movi=0x380C idx0=0x4 idx1=0x1F8C)
    Auto-selected AVI audio ID = 2
    Auto-selected AVI video ID = 0
    AVI: Searching for audio stream (id:2)
    AVI video size=641146236 (133641) audio size=85530240 (222735)
    VIDEO: [XVID] 640x368 24bpp 25.000 fps 959.5 kbps (117.1 kbyte/s)
    Auto-selected AVI audio ID = 2
    [V] filefmt:3 fourcc:0x44495658 size:640x368 fps:25.000 ftime:=0.0400
    Clip info:
    Software: VirtualDubMod 1.5.4.1 (build 2066/release)
    ID_CLIP_INFO_NAME0=Software
    ID_CLIP_INFO_VALUE0=VirtualDubMod 1.5.4.1 (build 2066/release)
    ID_CLIP_INFO_N=1
    File not found: '/home/ondra/Plocha/Poirot - S12E02 - The Clocks - ENG.srt'
    Failed to open /home/ondra/Plocha/Poirot - S12E02 - The Clocks - ENG.srt.
    File not found: '/home/ondra/Plocha/Poirot - S12E02 - The Clocks - ENG.srt'
    Failed to open /home/ondra/Plocha/Poirot - S12E02 - The Clocks - ENG.srt.
    [ass] ass_read_file(/home/ondra/Plocha/Poirot - S12E02 - The Clocks - ENG.srt): fopen failed
    Cannot load subtitles: /home/ondra/Plocha/Poirot - S12E02 - The Clocks - ENG.srt
    get_path('sub/') -> '/home/ondra/.mplayer/sub/'
    [file] File size is 115710 bytes
    STREAM: [file] /mnt/ubuntu/home/sdilene/Hercule.Poirot.S12E01.Hodiny.DVDRip.XviD.cz.en-iNG.srt
    STREAM: Description: File
    STREAM: Author: Albeu
    STREAM: Comment: based on the code from ??? (probably Arpi)
    SUB: Detected subtitle file format: subviewer
    SUB: opened iconv descriptor.
    SUB: closed iconv descriptor.
    SUB: Read 1352 subtitles, 0 bad line(s).
    [file] File size is 115710 bytes
    STREAM: [file] /mnt/ubuntu/home/sdilene/Hercule.Poirot.S12E01.Hodiny.DVDRip.XviD.cz.en-iNG.srt
    STREAM: Description: File
    STREAM: Author: Albeu
    STREAM: Comment: based on the code from ??? (probably Arpi)
    [ass] Opened iconv descriptor
    [ass] Closed iconv descriptor
    [ass] File size: 300
    [ass] Opened iconv descriptor
    [ass] Closed iconv descriptor
    [ass] [0xa6f6ef8] Style: Default,Arial,20,&H00ffffff,&H00000000,&H00000000,0,0,2,1,1,2,20,20,8
    plaintext event at 1000, +3000: Downloaded From www.AllSubs.org
    plaintext event at 35920, +1670: - Good night Annie.\N- Good night Fi.
    plaintext event at 5286120, +3590: - Yes please.\N- Let's start again.
    plaintext event at 5290710, +10000: Downloaded From www.AllSubs.org
    ID_FILE_SUB_ID=0
    ID_FILE_SUB_FILENAME=/mnt/ubuntu/home/sdilene/Hercule.Poirot.S12E01.Hodiny.DVDRip.XviD.cz.en-iNG.srt
    SUB: Added subtitle file (1): /mnt/ubuntu/home/sdilene/Hercule.Poirot.S12E01.Hodiny.DVDRip.XviD.cz.en-iNG.srt
    ID_FILENAME=/mnt/ubuntu/home/sdilene/Hercule.Poirot.S12E01.Hodiny.DVDRip.XviD.cz.en-iNG.avi
    ID_DEMUXER=avi
    ID_VIDEO_FORMAT=XVID
    ID_VIDEO_BITRATE=959504
    ID_VIDEO_WIDTH=640
    ID_VIDEO_HEIGHT=368
    ID_VIDEO_FPS=25.000
    ID_VIDEO_ASPECT=0.0000
    ID_AUDIO_FORMAT=85
    ID_AUDIO_BITRATE=128000
    ID_AUDIO_RATE=0
    ID_AUDIO_NCH=0
    ID_START_TIME=0.00
    ID_LENGTH=5345.64
    ID_SEEKABLE=1
    ID_CHAPTERS=0
    X11 opening display: :0.0
    vo: X11 color mask: FFFFFF (R:FF0000 G:FF00 B:FF)
    vo: X11 running at 1680x1050 with depth 24 and 32 bpp (":0.0" => local display)
    [x11] Current fstype setting doesn't honour any X atoms
    [VO_XV] Using Xv Adapter #0 (NV17 Video Texture)
    [xv common] Drawing no colorkey.
    [xv common] Maximum source image dimensions: 2046x2046
    Opening video filter: [screenshot]
    Opening video filter: [ass]
    [screenshot] query(Planar YV12) -> 3
    [ass] FreeType library version: 2.4.4
    [ass] FreeType headers version: 2.4.3
    [ass] Init
    get_path('fonts') -> '/home/ondra/.mplayer/fonts'
    get_path('subfont.ttf') -> '/home/ondra/.mplayer/subfont.ttf'
    [ass] Updating font cache
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    INFO: libavcodec init OK!
    Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
    ==========================================================================
    ID_VIDEO_CODEC=ffodivx
    ==========================================================================
    Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
    dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
    mp3lib: using SSE optimized decore!
    MP3lib: init layer2&3 finished, tables done
    MPEG 1.0, Layer III, 48000 Hz 128 kbit Joint-Stereo, BPF: 384
    Channels: 2, copyright: No, original: No, CRC: No, emphasis: 0
    AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
    ID_AUDIO_BITRATE=128000
    ID_AUDIO_RATE=48000
    ID_AUDIO_NCH=2
    Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
    ==========================================================================
    Building audio filter chain for 48000Hz/2ch/s16le -> 0Hz/0ch/??...
    [libaf] Adding filter scaletempo
    [libaf] Adding filter equalizer
    [scaletempo] 1.000 speed * 1.000 scale_nominal = 1.000
    [libaf] Adding filter format
    [format] Changing sample format from little-endian 16-bit signed int to little-endian 32-bit float
    [format] Accelerated little-endian 16-bit signed int to little-endian 32-bit float conversion
    [scaletempo] 1.000 speed * 1.000 scale_nominal = 1.000
    [format] Changing sample format from little-endian 16-bit signed int to little-endian 32-bit float
    [format] Accelerated little-endian 16-bit signed int to little-endian 32-bit float conversion
    Trying preferred audio driver 'alsa', options '[none]'
    alsa-init: requested format: 48000 Hz, 2 channels, 1d
    alsa-init: using ALSA 1.0.23
    alsa-init: setup for 1/2 channel(s)
    alsa-init: using device default
    alsa-init: pcm opened in blocking mode
    alsa-init: got buffersize=65536
    alsa-init: got period size 1024
    alsa: 48000 Hz/2 channels/8 bpf/65536 bytes buffer/Float 32 bit Little Endian
    AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
    AO: Description: ALSA-0.9.x-1.x audio output
    AO: Author: Alex Beregszaszi, Zsolt Barat <[email protected]>
    AO: Comment: under development
    Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/floatle...
    [scaletempo] 1.000 speed * 1.000 scale_nominal = 1.000
    [format] Changing sample format from little-endian 16-bit signed int to little-endian 32-bit float
    [format] Accelerated little-endian 16-bit signed int to little-endian 32-bit float conversion
    [scaletempo] 1.000 speed * 1.000 scale_nominal = 1.000
    [format] Changing sample format from little-endian 16-bit signed int to little-endian 32-bit float
    [format] Accelerated little-endian 16-bit signed int to little-endian 32-bit float conversion
    ID_AUDIO_CODEC=mp3
    [Mixer] No hardware mixing, inserting volume filter.
    [libaf] Adding filter volume
    [scaletempo] 1.000 speed * 1.000 scale_nominal = 1.000
    [format] Changing sample format from little-endian 16-bit signed int to little-endian 32-bit float
    [format] Accelerated little-endian 16-bit signed int to little-endian 32-bit float conversion
    [scaletempo] 1.000 speed * 1.000 scale_nominal = 1.000
    [format] Changing sample format from little-endian 16-bit signed int to little-endian 32-bit float
    [format] Accelerated little-endian 16-bit signed int to little-endian 32-bit float conversion
    Starting playback...
    SEEK: i=31390 (max:31427) dpos=6703872 (wanted:6703872)
    SEEK: idx=31390 (a:31390 v:31427) v.skip=12 a.skip=0/0.000
    XXX initial v_pts=418.520 a_pos=8064 (0.504)
    [libaf] Reallocating memory in module format, old len = 0, new len = 69637
    Increasing filtered audio buffer size from 0 to 69632
    [mpeg4 @ 0x8a2dc40]Invalid and inefficient vfw-avi packed B frames detected
    [ffmpeg] aspect_ratio: 1.739130
    VDec: vo config request - 640 x 368 (preferred colorspace: Planar YV12)
    Trying filter chain: ass screenshot vo
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is 1.74:1 - prescaling to correct movie aspect.
    ID_VIDEO_ASPECT=1.7391
    VO Config (640x368->640x368,flags=0,'MPlayer',0x32315659)
    REQ: flags=0x437 req=0x0
    [swscaler @ 0x8ad6520]using unscaled yuv420p -> rgb24 special converter
    REQ: flags=0x437 req=0x0
    VO: [xv] 640x368 => 640x368 Planar YV12
    VO: Description: X11/Xv
    VO: Author: Gerd Knorr <[email protected]> and others
    Xvideo image format: 0x32595559 (YUY2) packed
    Xvideo image format: 0x32315659 (YV12) planar
    Xvideo image format: 0x59565955 (UYVY) packed
    Xvideo image format: 0x30323449 (I420) planar
    using Xvideo port 331 for hw scaling
    *** [ass] Allocating mp_image_t, 640x368x12bpp YUV planar, 353280 bytes
    *** [ass] Allocating mp_image_t, 640x368x12bpp YUV planar, 353280 bytes
    [ass] PlayResX undefined, setting to 384
    *** [vo] Allocating mp_image_t, 640x368x12bpp YUV planar, 353280 bytes
    *** [screenshot] Direct Rendering mp_image_t, 640x368x12bpp YUV planar, 353280 bytes
    Unicode font: 1185 glyphs.
    Unicode font: 1185 glyphs.
    *** [ass] Allocating mp_image_t, 640x368x12bpp YUV planar, 353280 bytes
    ===== PAUSE =====
    ID_PAUSED
    [ass] Font info: family 'Arial', style 'Normal', fullname 'Arial', slant 0, weight 80
    [ass] fontconfig_select: (Arial, 80, 0) -> /usr/share/fonts/TTF/arial.ttf, 0
    ===== PAUSE =====
    ID_PAUSED
    ===== PAUSE =====
    ID_PAUSED
    ===== PAUSE =====
    ID_PAUSED
    So it seems there is no error during the resuming.

  • Can we have a filter to handle all the apps in a container?

    Hi,
    I have a simple (Stupid) question.
    Can I configure a Servlet filter to intercept requests to all the applications (a.k.a all the ServletContexts)? All I know is we can configure a filter for each ServletContext (application), but I am wondering if there is any way.
    The reason I am asking is because, if there is a way to do so, I can configure my filter to provide me the debug output (Such as CGI, session, request, and ServletContext variables) on all the applications on development servers and when I can get rid of debugging on production servers (by not deploying the filter).
    Thanx in advance,
    Thirupati Panyala

    Thanks for the reply Sudhir.
    I tried it in Tomcat 4.x. It works for only the root resources even though I configured the filter for /* which is expected to include all the resources including root (for ex: /examples/...).
    So, I understand, the web.xml under /conf will be overriden by that of the respective apps as you go further down the context paths (apps). That's why the container was not executing my filter when I went to the next level of the URI (http://localhost:8080/index.html WORKED, but NOT http://localhost:8080/examples/jsp/num/numguess.jsp).
    If you want to try it for yourself, here is the piece of code I tried with (This is taken from Apache Tomcat source):
    package filters;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.sql.Timestamp;
    import java.util.Enumeration;
    import java.util.Locale;
    import javax.servlet.Filter;
    import javax.servlet.FilterChain;
    import javax.servlet.FilterConfig;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import javax.servlet.http.Cookie;
    import javax.servlet.http.HttpServletRequest;
    * Example filter that dumps interesting state information about a request
    * to the associated servlet context log file, before allowing the servlet
    * to process the request in the usual way. This can be installed as needed
    * to assist in debugging problems.
    * @author Craig McClanahan
    * @version $Revision: 1.5 $ $Date: 2001/05/23 22:26:17 $
    public final class RequestDumperFilter implements Filter {
    // ----------------------------------------------------- Instance Variables
    * The filter configuration object we are associated with. If this value
    * is null, this filter instance is not currently configured.
    private FilterConfig filterConfig = null;
    // --------------------------------------------------------- Public Methods
    * Take this filter out of service.
    public void destroy() {
    this.filterConfig = null;
    * Time the processing that is performed by all subsequent filters in the
    * current filter stack, including the ultimately invoked servlet.
    * @param request The servlet request we are processing
    * @param result The servlet response we are creating
    * @param chain The filter chain we are processing
    * @exception IOException if an input/output error occurs
    * @exception ServletException if a servlet error occurs
    public void doFilter(ServletRequest request, ServletResponse response,
    FilterChain chain)
         throws IOException, ServletException {
    if (filterConfig == null)
         return;
         // Render the generic servlet request properties
         StringWriter sw = new StringWriter();
         PrintWriter writer = new PrintWriter(sw);
         writer.println("Request Received at " +
              (new Timestamp(System.currentTimeMillis())));
         writer.println(" characterEncoding=" + request.getCharacterEncoding());
         writer.println(" contentLength=" + request.getContentLength());
         writer.println(" contentType=" + request.getContentType());
         writer.println(" locale=" + request.getLocale());
         writer.print(" locales=");
         Enumeration locales = request.getLocales();
         boolean first = true;
         while (locales.hasMoreElements()) {
         Locale locale = (Locale) locales.nextElement();
         if (first)
         first = false;
         else
         writer.print(", ");
         writer.print(locale.toString());
         writer.println();
         Enumeration names = request.getParameterNames();
         while (names.hasMoreElements()) {
         String name = (String) names.nextElement();
         writer.print(" parameter=" + name + "=");
         String values[] = request.getParameterValues(name);
         for (int i = 0; i < values.length; i++) {
         if (i > 0)
              writer.print(", ");
              writer.print(values);
         writer.println();
         writer.println(" protocol=" + request.getProtocol());
         writer.println(" remoteAddr=" + request.getRemoteAddr());
         writer.println(" remoteHost=" + request.getRemoteHost());
         writer.println(" scheme=" + request.getScheme());
         writer.println(" serverName=" + request.getServerName());
         writer.println(" serverPort=" + request.getServerPort());
         writer.println(" isSecure=" + request.isSecure());
         // Render the HTTP servlet request properties
         if (request instanceof HttpServletRequest) {
         writer.println("---------------------------------------------");
         HttpServletRequest hrequest = (HttpServletRequest) request;
         writer.println(" contextPath=" + hrequest.getContextPath());
         Cookie cookies[] = hrequest.getCookies();
    if (cookies == null)
    cookies = new Cookie[0];
         for (int i = 0; i < cookies.length; i++) {
         writer.println(" cookie=" + cookies[i].getName() +
                   "=" + cookies[i].getValue());
         names = hrequest.getHeaderNames();
         while (names.hasMoreElements()) {
         String name = (String) names.nextElement();
              String value = hrequest.getHeader(name);
         writer.println(" header=" + name + "=" + value);
         writer.println(" method=" + hrequest.getMethod());
         writer.println(" pathInfo=" + hrequest.getPathInfo());
         writer.println(" queryString=" + hrequest.getQueryString());
         writer.println(" remoteUser=" + hrequest.getRemoteUser());
         writer.println("requestedSessionId=" +
                   hrequest.getRequestedSessionId());
         writer.println(" requestURI=" + hrequest.getRequestURI());
         writer.println(" servletPath=" + hrequest.getServletPath());
         writer.println("=============================================");
         // Log the resulting string
         writer.flush();
         response.getWriter().print(sw.getBuffer().toString());
         // Pass control on to the next filter
    chain.doFilter(request, response);
    * Place this filter into service.
    * @param filterConfig The filter configuration object
    public void init(FilterConfig filterConfig) throws ServletException {
         this.filterConfig = filterConfig;
    * Return a String representation of this object.
    public String toString() {
         if (filterConfig == null)
         return ("RequestDumperFilter()");
         StringBuffer sb = new StringBuffer("RequestDumperFilter(");
         sb.append(filterConfig);
         sb.append(")");
         return (sb.toString());
    And the config in web.xml is :
    <filter>
    <filter-name>Request Dumper Filter</filter-name>
    <filter-class>filters.RequestDumperFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>Request Dumper Filter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    Thanx
    Thirupati Panyala

  • Link to page not working in browser

    Scenario: two .pdfs generated from FrameMaker with full Acrobat 7.0. Document A contains a cross-reference to a heading on page 7 of document B.
    Behaviour in desktop Reader: clicking on the link in Document A opens Document B, at page 7
    Behaviour in browser with Reader plugin: clicking on the link in Document A opens Document B, at page 1
    The second behaviour is obviously less help to the [human] reader. Does anyone know of any workaround?
    [note: not random cross-posting, but I will post this in the FrameMaker forums as well]

    I am also facing the same issue.Can anyone suggest a workaround for this issue.

Maybe you are looking for

  • Nokia 5800XM E-Mail Problem

    Hi I configured standard e-mail browser in my 5800XM. Everytime i want to donwload messages it us using gprs connection instead of wlan. When I'm starting internet browser it asks me if I want use gprs or wlan. How to do the same with E-mail browser?

  • UINavbaritem:initWithTitle:image doesnt work, bug? Image link inside

    I have the following code UIImage *image = [[UIImage imageNamed:@"test.png"] retain]; self.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"Test" image:image tag:0]; But the image doesnt show up, only a square shows up in place of it any ideas? lin

  • Client Export takes a long time...

    Hi, I have a 500 GB of Client Export and I can see it has been creating 3 files and the speed is 50 GB/24 h. It will take me 10 days to get the export done.... HW is a 10 GB of RAM 2 CPU (Dualcore) 1. Is there anyway we can a better speed ? 2. Will t

  • Printing list of keywords used (xml file)

    Hi! Back again after four "quiwt" month with the result of "empty brain" syndrome: How do I print the list exported list of keywords, the xml file? Thanks for any hints (= re-awaking grey cells)... Alexander

  • App installed with different account

    I need to update an Aperture app that was installed with my old account that I don't use anymore and I don't know the password to it. Since I have an old version of this program on my mac, can I pay extra for update with my account or I have to buy a