小编Fay*_*Ali的帖子

从servlet过滤器重定向到jsf会返回未呈现为html的实际jsf代码

下面是我的代码;

    /*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package racms;

import java.io.IOException;
import javax.faces.application.NavigationHandler;
import javax.faces.context.FacesContext;
import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;


@WebFilter("/faces/*")
public class AuthenticationFilter implements Filter {

    @Override
    public void init(FilterConfig config) throws ServletException {
        // If you have any <init-param> in web.xml, then you could get them
        // here by config.getInitParameter("name") and assign it as field.
    }

    @Override
    public void doFilter(ServletRequest …
Run Code Online (Sandbox Code Playgroud)

servlets login jsf-2 glassfish-3 servlet-filters

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

glassfish-3 ×1

jsf-2 ×1

login ×1

servlet-filters ×1

servlets ×1