Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9068973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:18:45+00:00 2026-06-16T17:18:45+00:00

I am doing a project for school. I am using JSF and Primefaces. But

  • 0

I am doing a project for school. I am using JSF and Primefaces. But to check authorization with Servlet Filter when HTML5 file called in JSF project. Because JSF doesn’t support HTML5.
Project has a HTML5 page. It is necessary to login to reach this page.
However, I can’t open Pop-Up or Message or Growl when HTML5 file called without login.

Can I use FacesMessage in LoginFilter ?

Code:

@WebFilter(urlPatterns = {  "/design.html" , "/demodesign.html" } )
public class LoginFilter implements Filter{
@Override
public void doFilter(ServletRequest req, ServletResponse res,
        FilterChain chain) throws IOException, ServletException {

    HttpServletRequest request = (HttpServletRequest) req;
    HttpServletResponse response = (HttpServletResponse) res;
    HttpSession session = request.getSession(false);

    UserBean userBean = (UserBean) ((session != null) ? session.getAttribute("userBean") : null);
    User member = null;

    if ( !(userBean == null) )
        member = userBean.getMember();

    if (member != null) {
        chain.doFilter(request, response);
    } else {
        response.sendRedirect(welcomeURL);
    }

}
 }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T17:18:46+00:00Added an answer on June 16, 2026 at 5:18 pm

    Because JSF doesn’t support HTML5

    This is complete nonsense. JSF is just a HTML code producer. It can produce legit HTML5 code without trouble. You can just place "plain vanilla" HTML5 elements like <canvas> in a JSF page. It will just untouch it and output it as-is. All what JSF can do more for you is to wrap it in a custom/composite component like <my:canvas> so that the submitted values are immediately updated as bean properties and that you can perform validation and attach listeners on it without any additional effort.

    Just rename those HTML files to .xhtml and add/use a *.xhtml mapping on the FacesServlet. This way you’ll be able to use JSF components on those so-called HTML5 pages.

    See also:

    • Is it possible to use JSF+Facelets with HTML 4/5?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing a school project about maintaining a personal Database. but my tutors didn't
I'm doing a school project using Drupal; and the school give us a SunOS
Hi i am currently doing a school project using cakePHP. I have the following
I started doing game for my school project in C++ with SDL library. But
I'm doing a project for school, so I need to compile it with: gcc
Hello I am in the process of doing a school project, where we have
BACKGROUND I'm doing an interactive art project for school. PROCESS For this project the
A simple description of our architecture for the school project we are doing: -we
I'm doing a grad-school software engineering project and I'm looking for the protocol that
I'm doing project on object detection using javacv in that I went through couple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.