0 Replies Latest reply: Jul 31, 2013 3:33 PM by 1011717 RSS

    Instrumenting Coherence *web into Tomcat 6.0.35

    1011717
      • We are using Apache Tomcat 6.0.35 with Coherence*web for the session replication. As part of install and inspect phase of coherence*web instrumentation into the webApp, we see below main changes to the webApp. The servlet spec that is introduced is of 2.3, this is causing issue of session invalidation / session timeout. Tried to override the default behavior of introducing the servlet spec version to 2.5 , but no luck as of now.

       

      1. Below is the page include that’s part of each jsp page that coherence instruments. 

       

      <%@ page extends="com.tangosol.coherence.servlet.api23.JspServlet" %>

       

      2. As part of coherence instrumentation: coherence is replacing existing filters specific to stripes.

       

      Original webApp web.xml

       

        <filter>

      <display-name>Stripes Filter</display-name>

              <filter-name>StripesFilter</filter-name>

              <filter-class>

      net.sourceforge.stripes.controller.StripesFilter

           </filter-class>

              <init-param>

      <param-name>Interceptor.Classes</param-name>

      <param-value>

      net.sourceforge.stripes.integration.spring.SpringInterceptor,

      com.barclaycardus.app.cws.intercepts.RequestInterceptor,

      com.barclaycardus.app.cws.intercepts.TimeoutInterceptor,               

      com.barclaycardus.app.cws.intercepts.AssertLoginInterceptor,

      com.barclaycardus.app.cws.intercepts.XssInterceptor,

      com.barclaycardus.app.cws.intercepts.AssertThreadDataInterceptor,

      com.barclaycardus.app.cws.intercepts.AbandonedFlowInterceptor,

      com.barclaycardus.app.cws.intercepts.AgentRestrictInterceptor,

       

       

      1. web.xml after Coherence Instrumentation.

       

      <filter>

          <display-name>Stripes Filter</display-name>

      <filter-name>StripesFilter</filter-name>

          <filter-class>com.tangosol.coherence.servlet.api23.FilterWrapper</filter-class>

          <init-param>

      <param-name>Interceptor.Classes</param-name>

      <param-value>net.sourceforge.stripes.integration.spring.SpringInterceptor,

      com.barclaycardus.app.cws.intercepts.RequestInterceptor,

      com.barclaycardus.app.cws.intercepts.TimeoutInterceptor,

      com.barclaycardus.app.cws.intercepts.AssertLoginInterceptor,

      com.barclaycardus.app.cws.intercepts.XssInterceptor,

      com.barclaycardus.app.cws.intercepts.AssertThreadDataInterceptor,

      =============================================================================================

       

       

      Below are the steps that were used to instrument coherence to the webApp for Apache Tomcat 6.0.35.

       

      java -jar webInstaller.jar <Working Directory>/servicing.war -inspect -server:Tomcat/6.0.x

       

      java -jar webInstaller.jar <Working Directory>/servicing.war -install

       

       

       

      Exception stack trace when the app is being tested.

       

       

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)

      at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)

      at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)

      at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)

      at java.lang.Thread.run(Thread.java:662)

      Caused by: javax.servlet.ServletException: net.sourceforge.stripes.exception.StripesJspException: An exception was raised while invoking a layout. The layout used was '/WEB-INF/view/templates/.jsp'. The following information was supplied to the render tag: LayoutContext{component names=[page, subPage], parameters={}}

      at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:861)

      at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794)

      at org.apache.jsp.WEB_002dINF.view.errors._404_jsp._jspService(_404_jsp.java:129)

      at com.tangosol.coherence.servlet.api23.JspServlet.service(JspServlet.java:141)

      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)

      ... 19 more

      Caused by: javax.servlet.ServletException: File &quot;/WEB-INF/view/templates/.jsp&quot; not found

      at org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:335)

      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)

      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at net.sourceforge.stripes.controller.DynamicMappingFilter.doFilter(DynamicMappingFilter.java:397)

      at com.tangosol.coherence.servlet.SessionHelper.filter(SessionHelper.java:1468)

      at com.tangosol.coherence.servlet.api23.FilterWrapper.doFilter(FilterWrapper.java:135)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

       

       

      Any pointers are really appreciated.