Filter on Sip Servlet

Hy all
I have a question for you. Is it possible to filter sip message with a personal implementation of a Filter interface (com.bea.wcp.sip.engine.server.Filter)?
Reading documentation i understan it's simple to create a filter and a FilterChain but i can't understant how it's possible to map this object on the server.
Thanks a lot for any response
Regards Gianluca Orlando

<url-pattern>/*.jsp</url-pattern> this means it will search for all the jsp's in the directory.

Similar Messages

  • Deploy sip servlet to Occas5.0(weblogic) occurs exception: com.bea.wcp.sip.engine.server.setup.SipAnnotationParsingException

    hi,
    I install Occas on OS win7 64bit, jdk 1.6.0.45.
    I got the following error message while I start Occas server:
    because error occurs when parsing sip related annotations of "testservicecomplexobject-application"
    WLST-WLS-1396579151484: com.bea.wcp.sip.engine.server.setup.SipAnnotationParsingException
    at com.bea.wcp.sip.engine.server.setup.SipAnnotationData.<init><SipAnnotationData.java:155>
    Also, when I deploy a sip servlet package(sar) to the Occas server, after deploy finish, at the deployment manager page,
    health term is none.
    and also I found many error info in AdminServer/logs/domain.log as below blue font:
    ####<Apr 4, 2014 11:09:21 AM CST> <Error> <WLSS.Setup> <E76C3BE51B4188> <AdminServer> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1396580961513> <BEA-331210> <Skip SIP related logic, because error occurs when parsing sip related annotations of "b2bua-sip-servlet-1.0.0-SNAPSHOT"
    com.bea.wcp.sip.engine.server.setup.SipAnnotationParsingException:
        at com.bea.wcp.sip.engine.server.setup.SipAnnotationData.<init>(SipAnnotationData.java:155)
        at com.bea.wcp.sip.util.DeploymentUtil.getOrCreateAnnotationData(DeploymentUtil.java:74)
        at com.bea.wcp.sip.util.DeploymentUtil.getAnnotationData(DeploymentUtil.java:89)
        at com.bea.wcp.sip.engine.server.SipServerTailModule$1.visit(SipServerTailModule.java:129)
        at com.bea.wcp.sip.engine.server.SipServerTailModule.visitAllContexts(SipServerTailModule.java:112)
        at com.bea.wcp.sip.engine.server.SipServerTailModule.initialize(SipServerTailModule.java:137)
        at com.bea.wcp.sip.engine.server.SipServerTailModule.prepare(SipServerTailModule.java:69)
        at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)
        at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1221)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
        at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
        at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:43)
        at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
        at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
        at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
        at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused By: java.lang.LinkageError: loader constraint violation: when resolving overridden method "antlr.debug.LLkDebuggingParser.removeMessageListener(Lantlr/debug/MessageListener;)V" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, antlr/debug/LLkDebuggingParser, and its superclass loader (instance of sun/misc/Launcher$AppClassLoader), have different Class objects for the type antlr/debug/MessageListener used in the signature
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2436)
        at java.lang.Class.privateGetPublicMethods(Class.java:2556)
        at java.lang.Class.getMethods(Class.java:1412)
        at com.bea.wcp.sip.engine.server.setup.SipAnnotationData.classAnnotationParsing(SipAnnotationData.java:344)
        at com.bea.wcp.sip.engine.server.setup.SipAnnotationData.jarAnnotationParsing(SipAnnotationData.java:288)
        at com.bea.wcp.sip.engine.server.setup.SipAnnotationData.annotationParsing(SipAnnotationData.java:223)
        at com.bea.wcp.sip.engine.server.setup.SipAnnotationData.<init>(SipAnnotationData.java:144)
        at com.bea.wcp.sip.util.DeploymentUtil.getOrCreateAnnotationData(DeploymentUtil.java:74)
        at com.bea.wcp.sip.util.DeploymentUtil.getAnnotationData(DeploymentUtil.java:89)
        at com.bea.wcp.sip.engine.server.SipServerTailModule$1.visit(SipServerTailModule.java:129)
        at com.bea.wcp.sip.engine.server.SipServerTailModule.visitAllContexts(SipServerTailModule.java:112)
        at com.bea.wcp.sip.engine.server.SipServerTailModule.initialize(SipServerTailModule.java:137)
        at com.bea.wcp.sip.engine.server.SipServerTailModule.prepare(SipServerTailModule.java:69)
        at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)
        at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1221)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
        at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
        at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:43)
        at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
        at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
        at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
        at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >
    ####<Apr 4, 2014 11:09:21 AM CST> <Error> <WLSS.Engine> <E76C3BE51B4188> <AdminServer> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1396580961523> <BEA-330004> <Failed to deploy SIP application "b2bua-sip-servlet-1.0.0-SNAPSHOT"
    java.lang.NullPointerException
        at com.bea.wcp.sip.engine.server.setup.SipDeploymentDescriptor.<init>(SipDeploymentDescriptor.java:285)
        at com.bea.wcp.sip.engine.server.setup.SipDeploymentDescriptor.parse(SipDeploymentDescriptor.java:148)
        at com.bea.wcp.sip.engine.server.CanaryContext.initContext(CanaryContext.java:396)
        at com.bea.wcp.sip.engine.server.CanaryContext.<init>(CanaryContext.java:334)
        at com.bea.wcp.sip.engine.server.CanaryServer.installContext(CanaryServer.java:1001)
        at com.bea.wcp.sip.engine.server.SipService.setupSipServletContext(SipService.java:126)
        at com.bea.wcp.sip.engine.server.SipServerTailModule$1.visit(SipServerTailModule.java:130)
        at com.bea.wcp.sip.engine.server.SipServerTailModule.visitAllContexts(SipServerTailModule.java:112)
        at com.bea.wcp.sip.engine.server.SipServerTailModule.initialize(SipServerTailModule.java:137)
        at com.bea.wcp.sip.engine.server.SipServerTailModule.prepare(SipServerTailModule.java:69)
        at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)
        at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1221)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
        at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
        at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:43)
        at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
        at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
        at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
        at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Can anyone give some suggession?
    Thanks in advance!
    BR//Margin

    Hi,
    I changed my jvm from sun jdk to latest jrockit and the issue was solved :)

  • Sending an INVITE to my VoIP account by a SIP Servlet

    I tried to make an outbound call to an ordinary landline number through my VoIP account by a SIP Servlet, but never been successful.
    I tried something similar to the following:
    javax.servlet.sip.SipFactory factory=(javax.servlet.sip.SipFactory) this.getServletContext().getAttribute(javax.servlet.sip.SipServlet.SIP_FACTORY);
    javax.servlet.sip.SipApplicationSession appSession =factory.createApplicationSession();
    to = “sip:land_line_number@my_voip_proxy_server.com”
    from=”sip:my_voip_did_number:my_voip_password@ my_voip_proxy_server.com”
    javax.servlet.sip.SipServletRequest invite = factory.createRequest(appSession, "INVITE", from, to);
    invite.pushRoute(URI of my_voip_outbound_proxy_server.com);
    invite.send();
    I use Weblogic SIP server. I configured sip.xml, and everything else is correct to my knowledge.
    I always get the error message something similar to “Cannot resolve path to my_voip_proxy_server.com”
    (Note: When I use SJPhone softphone with my VoIP account details, it simply rings to a landline)
    Is the way I incorporating my_voip_outbound_proxy_server correct?
    Any help from anyone is greatly appreciated.
    Thank you very much.

    hi there,
    I am at the same point too..
    I am using a softphone called mirrial , Using Bea WEB Logic SIP Server...Deployed sar arhieve , did not define any outbound proxy in client side , did not specify default servlet name for sip server..
    Is there anybody who succedded such kind of proxy calls ?
    And can clarify the details if have?
    Thanks

  • I can't install sailfin SIP Servlet in Netbeans.

    I downloaded sailfin SIP .jar and extract jar file. I go to Plug in > Available Plugin and click Add plungin button by installing them from the lib/tools/netbeans subdirectory of a SailFin. Netbeans show SIP plungin for install. but I can install all of SIP plungin except SIP Project. When I select SIP Project and install it show error can't install. So I'm not install SIP Project but when I create new project I can't find SIP catagory. please help me. How to install SIP servlet in Netbeans6.9 .
    Edited by: user12864851 on 23 มี.ค. 2554, 1:27 น.

    What exactly happens when you attempt to create a backup?

  • How to add SIP servlets pluggins to OEPE for Oracle weblogic server 10.3.4

    Please procide the solution to :
    Is it possible to add SIP servlets pluggins to OEPE for Oracle weblogic server 10.3.4.0 or OCCAS(Oracle communication Converged Application Server)??
    As Its not their by default.
    Please do the needfull...

    This forum is for Oracle WebLogic Communication Services. Please direct your question to one of the WebLogic Server forums or to OCCAS forum/support.
    - Dev

  • Embedding STUN server in SIP servlet application?

    Hello,
    I'm trying to find a good way to integrate a STUN server into my SipServer application. One approach requires that I be able to receive and process both STUN and SIP packets from the same listen port. Basically, I want to open a single listen port (like 5060) to receive UDP packets in my SIP servlet container. I'd then like to take any SIP messages I receive on that port and hand them to my SIP servlet. No problem - that's what SipServer provides out of the box. But I'd also like to receive any STUN packets and hand them off to my STUN server code for STUN activities. Anyone know of a way to accomplish this with some fancy configuration of a channel or 2? I don't know the WLS/WLSS architecture well enough to think of anything truely clever.
    My coworker tells me this isn't possible, or at least not without Herculean effort and major custom coding to route packets. I sure would like to prove him wrong ;)
    Thanks -
    Brian.

    It should certainly be possible to debug the sipServlet application in eclipse.
    I use Intellij IDEA for remote debugging and here is the command I use:
    %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -Dweblogic.Name=%SERVER_NAME% -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy="%WL_HOME%\server\lib\weblogic.policy" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 weblogic.Server
    I guess, what you are missing is suspend=y. Your options have a suspend=n.
    cheers,
    Mihir

  • Developing SIP Servlet using Eclipse

    Dear all,
    In the BEA documentation "developing SIP Servlet using Eclipse", it says:
    WebLogic SIP Server 3.0
    JDK 1.4.2
    Ant (installed with WebLogic SIP Server 3.0)
    Eclipse version 3.1
    CVS client and server (required only for version control)
    I want to kown it should be JDK 1.4.2 but not 1.5.0?
    And how to set Ant which installed with Weblogic SIP Server in Eclipse? Because I checked that Eclipse use the Ant by defaut.
    I really have problem with setting up Eclipse for developping SIP Servlet, Thanks for your help!
    li

    Dear all,
    I have resolved it.
    The path is not correct in the ant build file.
    Thanks

  • SIP Server vs SIP Servlet

    Hello,
    Can someone let me exact what the difference between SIP Server and SIP Servlet.?
    Regards,
    Deepak

    It's hard to be precise since "SIP Server" does not have a precise definition, but I'll try to help.
    The term SIP Server can apply to any network node meant to affect a SIP session. A server can act as SIP User Agent (UA), proxy, or back-to-back UA. Nothing about the way these applications are programmed is implied by the term "SIP Server."
    The SIP Servlet API (SSAPI) is a popular technology for implementing SIP applications; therefore you could say that a SIP Servlet container is a type of SIP Server. The SSAPI is specified in [JSR 289|http://jcp.org/en/jsr/detail?id=289] , and is an extension of the familiar servlet model that is also used for programming HTTP applications.
    OCCAS is a SIP Servlet container, and therefore also a SIP Server.
    Hope this helps,
    Tom.

  • Sip servlet container

    Hi everybody :)
    Tomcat is http servlet container as we all know, but is there sip servlet container known as "converged container" developed yet ?

    Actualy I found app server that supports sip servlets but it is not free. Is there any free one ?
    Hi again :)

  • Books on SIP Servlet API

    Hi,
    Can u people suggest some good books on Java SIP Servlet API.
    Thanks in advance !!
    With regards,
    Litty Preeth

    Hi Sebestian,
              I could  really understand the problem ,but as Far as Coding concerns the Same templates will suit for both C# and Vb.Net , So i suggest you to go through the E-Learning in SDN which is open source Go To E-Learning Sessions it was all presented in C# only , I Strongly belive after having a travel in E-Learning you would be able to work with all the objetcs
    Comments and feeds back is welocmed
    Regards
    Zubair

  • Custom filter calling Pipeline servlets

    Hi,
    Can we invoke the pipeline servlets from our custom filter without using the PageFilter, if we can please explain how to do that.
    And how to get the DynamoHttpRequestServlet as passing thru the pipeline we will get Dynamo request only.

    I have been following up this thread along with some other posts also from you on similar issue and thought of one approach. Although I am not sure if it is going to work or not due to any internal dependency on something which I may not know. But still you can try something like this to invoke the pipeline by calling HeadPipelineServlet from your own filter and see if it serves your purpose.
    //component path to refer atg.servlet.pipeline.HeadPipelineServlet
    String piplineStartServletPath = "/atg/dynamo/servlet/dafpipeline/DynamoHandler";
    //your filter implementation
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
      //try invoking HeadPipelineServlet
      Servlet startServlet = (Servlet)Nucleus.getGlobalNucleus().resolveName(piplineStartServletPath);
      if(startServlet != null)
        startServlet.service(request, response);
      //once HeadPipelineServlet is called check from the request attribute to see if we got the DynamoHttpServletRequest
      DynamoHttpServletRequest drequest = (DynamoHttpServletRequest)request.getAttribute("atg.servlet.request");
    }

  • Where to deploy the sip servlet

    Hi,
    general question: where are the servlet .class files, sip.xml and web.xml deployed to? Are there some other (configuration) files to be changed?
    I have deployed all these files to C:\bea\user_projects\domains\TestDomain\sipserver\config\WEB-INF
    but got just an exception.
    Thx

    Ok I've found out: Sip Server 3.0 expects an .war file to be stored under ../domains/domainName/autodeploy

  • 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.

  • Servlet Filter

    Hi, all
    I work on a web application running on a Jboss server and i would like to filter all the http request in order to save it in a database. (i save those informations for manage web stats).
    I suppose i may use servlet filter, but i don't know the operation of this
    Does anyone could help me giving some example and the protocol to set up this on the server (file server configuration as web.xml)

    Well here is what I know. I hope it helps.....
    First thing is to create a class that implements the "javax.servlet.Filter" interface. But there are also other Filter interfaces that you could use depending on what you want: Filter, FilterChain, and FilterConfig.
    You have to implement the init(), destroy() and doFilter() methods (I ommitted the arguments).
    But most of your work will be done in the doFilter () method. You could extract request information from one of the arguments in these method and have a datasource connection to save to your back-end.
    Something like :
    public void doFilter( ServletRequest request, ServletResponse responce, FilterChain chain ) throws  ServletException {
          HttpServletRequest httpRequest = (HttpServletRequest) request;
          backEndDelegate.saveInformation(  request.getRemoteAddr(),  request.getRemoteHost() );
          chain.doFilter( request, responce );
    }Second, you need to configure the Filter. In the web.xml file add the following tags:
    <filter>
         <filter-name>StatsFilter</filter-name>
          <description>Logs Web Stats to the back end</description>
         <filter-class>com.yourpackage.StatsFilter</filter-class>
         <!--  you can also pass parameters to the StatsFilter -->
          <!--
           <init-param>
                   <param-name>some parameter</param-name>
                   <param-value>some parameter</param-value>
            </init-param>
            -->
    </filter>
    <filter-mapping>
          <filter-name>StatsFilter</filter-name>
          <filter-pattern>*.jsp</filter-pattern>
    </filter-mapping>That is just a little example. You can associate a filter with a Servlet using the <filter-mapping> tags too. And you can also do filter chains, but I don't feel like going there.
    I sure hope that it was helpful. If not then "RTFM"

  • Servlet Filters not following filter mapping in web.xml

    Hi Experts,
    I have two Servlet filters SetCharacterEncodingFilter and LASBackOfficeAuthFilter which are mapped in such a way that SetCharacterEncodingFilter gets called before LASBackOfficeAuthFilter(This is done in web.xml using filter mapping).
    I have code in SetCharacterEncodingFilter init() method to read and store the few parameters from a table , it also creates a new thread to montior db changes in these paremeters . LASBackOfficeAuthFilter reads a those parameters set after SetCharacterEncodingFilter initialization. This is failing in Weblogic Version: 10.3.2.0 because the LASBackOfficeAuthFilter init method gets called before SetCharacterEncodingFilter init method.
    This is filter mapping order is working fine In Web Sphere and Tomcat 6 .
    The web.xml filter mapping is given below .
         <filter>
              <filter-name>LASBackOfficeAuthFilter</filter-name>
              <display-name>Scheduler Authentication Filter</display-name>
              <filter-class>com.scheduler.servlet.backoffice.LASBackOfficeAuthFilter</filter-class>
              <!-- parameters specifying BackOffice servlet path translation -->
              <init-param>
                   <param-name>PathLogin</param-name>
                   <param-value>/login</param-value>
              </init-param>
              <init-param>
                   <param-name>PathLogout</param-name>
                   <param-value>/logout</param-value>
              </init-param>
              <init-param>
                   <param-name>PathNotifications</param-name>
                   <param-value>/secure/notifications</param-value>
              </init-param>
              <init-param>
                   <param-name>PathSchedulerActions</param-name>
                   <param-value>/secure/schedactions</param-value>
              </init-param>
              <init-param>
                   <param-name>PathPing</param-name>
                   <param-value>/secure/ping</param-value>
              </init-param>
         </filter>
         <!--
              this filter sets character encoding and mimetype for requests and
              responses
         -->
         <filter>
              <filter-name>SetCharacterEncodingFilter</filter-name>
              <display-name>Scheduler Character Encoding Filter</display-name>
              <filter-class>com.scheduler.servlet.backoffice.SetCharacterEncodingFilter</filter-class>
         </filter>
         <!-- correlate servlets and filters -->
         <filter-mapping>
              <filter-name>SetCharacterEncodingFilter</filter-name>
              <servlet-name>LASBackOfficeServlet</servlet-name>
         </filter-mapping>
         <filter-mapping>
              <filter-name>LASBackOfficeAuthFilter</filter-name>
              <servlet-name>LASBackOfficeServlet</servlet-name>
         </filter-mapping>
    Any help on this would be very much appreciated .
    Regards
    Dinesh

    No, regular expressions are not supported. You can specify the mapping with extensions, or with paths, not at the same time in the same mapping specification. However, you can specify two servlet mappings, one with extension, and one with path.
    The exact wording from the spec (2.4) is as follows:
    In the Web application deployment descriptor, the following syntax is used to define
    mappings:
    • A string beginning with a ‘/’ character and ending with a ‘/*’ suffix is used
    for path mapping.
    • A string beginning with a ‘*.’ prefix is used as an extension mapping.
    • A string containing only the ’/’ character indicates the "default" servlet of
    the application. In this case the servlet path is the request URI minus the context
    path and the path info is null.
    • All other strings are used for exact matches only.

Maybe you are looking for

  • Alter tablespace command problem (sql statement))

    Hello, I have a table space named t_space2. I wanna add a datafile for this tablespace so I wrote on sql the following: Alter tablespace t_space2 add datafile 'D:\DATA\cust.dat' size 30 M; it gives me the following message: table space t_space2 doesn

  • How to vertical select a text in iWord.  Like we do in Mac version of MS Word by Command Option [and selecting]

    How to vertical select a text in iWord.  Like we do in Mac version of MS Word by Command Option [and selecting]

  • Some ads are not loading on my website.

    Since updating to the latest version of FF, I notice some of my ads are not showing up on my website. I can go to my site in Safari and they load perfectly which leads me to believe it is a FF issue blocking some ads and not others. I'm wondering if

  • Slow iMovie '08 launch (iPhoto movie clip export)

    After using iMovie 6 HD intensively for a year, I'm quite impressed with the new '08, especially its skimming and selection features and the whole new approach to quicker home movie creation. Surely the new version has many bugs. The worst one which

  • JTable setSelectionBackground

    Is there a way to set all the cells in a selected row in a JTable to the same selection background color. I'm able to set all cells in a selected row to a specific color EXCEPT the selected cell. This selected cell defaults to a white background - wh