Successfully!

Error!

Remote Design After CAS Integration in FineReport 11.0

  • Last update:  2023-11-21
  • Problem

    After CAS integration in FineReport 11.0, remote design is unavailable because its requests are intercepted by CAS.

    Solution

    To download the new interceptor and the XML file, click CAS Remote Design.zip.

    Defining a RemoteFilter

    1. Another RemoteFilter needs to be defined to filter the requests of remote design (request path: /remote/design) at the beginning. Source code of RemoteFilter is defined as follows:

    package com.fr;

    import javax.servlet.*;

    import javax.servlet.http.HttpServletRequest;

    import javax.servlet.http.HttpServletResponse;

    import java.io.IOException;

    public class RemoteFilter implements Filter { 

      

       public void destroy() { 

         }    

       public void init(FilterConfig filterConfig) throws ServletException {

           }    

       public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)       

             throws IOException, ServletException {

           HttpServletRequest req = (HttpServletRequest)servletRequest;       

           HttpServletResponse res = (HttpServletResponse)servletResponse;       

           req.getRequestDispatcher(req.getServletPath() + req.getPathInfo()).forward(req, res);  

         }

    }

    2. Place the compiled class file in the %TOMCAT_HOME%/webroot/WEB-INF/classes/com/fr path.

     

    Modifying the Web.xml File

    Add an interceptor to the Web.xml file in the %TOMCAT_HOME%\webapps\webroot\WEB-INF path or replace the Web.xml file with .xml file provided in the ZIP file. In the Web.xml file, add this new filter to the header of all filters accordingly through the following code.

    <filter>
             
    <filter-name>RemoteFilter</filter-name>                

             <filter-class>com.fr.RemoteFilter</filter-class>         

        </filter>
      <filter-mapping>                         

                             <filter-name>RemoteFilter</filter-name>
                             
    <url-pattern>/decision/remote/design</url-pattern>                         

                             <url-pattern>/decision/remote/design/*</url-pattern>        

    </filter-mapping>

     

    Restarting the Project

    Restart the report project.

    Notes

    If you still cannot connect to the project remotely after the setting, check whether your username has been assigned with the remote design permission. For details, see Remote Design.

     


    Attachment List


    Theme: Deployment and Integration
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback