0 Replies Latest reply on Apr 3, 2007 9:25 PM by Alan_Ji

    How to redirect to other jsp/html or flex page from java filter

    Alan_Ji
      I need to check whether the session was expired in filter: my configuration of filter is shown as bellow:
      <filter>
      <filter-name>userFilter</filter-name>
      <filter-class>com.frmwrk.filter.Filter</filter-class>
      </filter>
      <filter-mapping>
      <filter-name>userFilter</filter-name>
      <url-pattern>/messagebroker/*</url-pattern>
      </filter-mapping>

      i'll redirect to login.jsp when session expired:
      if (null == session.getAttribute("loginUser")) {
      HttpServletResponse response = (HttpServletResponse) res;
      response.sendRedirect(response.encodeRedirectUrl(" http://localhost:9080/test/login.jsp"));
      chain.doFilter(req, res);
      }

      but i'll recieve error message: NetConnection.Call.BadVersion on flex page.

      who can help me to resolve this problem?