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 7600427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:54:24+00:00 2026-05-30T22:54:24+00:00

I learned building a web-app with Java and Seam (and JSF 1.2) But now

  • 0

I learned building a web-app with Java and Seam (and JSF 1.2)

But now i’m working at the moment with pure Java EE 6 and JSF (Mojara 2.0.9) – without any extra Framework around.

In Seam i used for the index.xhtml the index.page.xmlfor restriction:

<restrict>#{authorizationManager.isAdmin()}</restrict>

Is there any equal function like the page.xml?

And:
I also used the index.page.xml to make some calls like:

<action execute="#{indexController.doSomething()}" on-postback="false"/>

Is it now the only chance to do it with an @PostConstruct in the Controller for the .xhtml?

Also how i’m doing something like this without the page.xml?

<navigation>
    <rule if-outcome="OK">
        <redirect view-id="/pages/index.xhtml" />
    </rule>
</navigation>

It seems to me, the pure JavaEE works totaly different?

(you don’t have to send me full code, just give me the key words i have to google, thanks!)

  • 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-05-30T22:54:25+00:00Added an answer on May 30, 2026 at 10:54 pm

    In Seam i used for the index.xhtml the index.page.xmlfor restriction:

    <restrict>#{authorizationManager.isAdmin()}</restrict>
    

    Is there any equal function like the page.xml?

    Standard JSF does not offer any builtin authenticaiton/authorization facilities. All is to be used from the “raw” Servlet API or a 3rd party framework like Spring Security.

    As to the “raw” Servlet API facilities, the <security-constraint> in web.xml comes close. You can only restrict on global URL patterns like /app/*, not on a per-page or maybe per-action basis.


    I also used the index.page.xml to make some calls like:

     <action execute="#{indexController.doSomething()}" on-postback="false"/>
    

    Is it now the only chance to do it with an @PostConstruct in the Controller for the .xhtml?

    The <f:event> in the XHTML page itself comes close:

    <f:event type="preRenderView" listener="#{indexController.doSomething}" />
    

    As to the on-postback replacement, check Is it possible to disable f:event type="preRenderView" listener on postback?.


    Also how i’m doing something like this without the page.xml?

    <navigation>
        <rule if-outcome="OK">
            <redirect view-id="/pages/index.xhtml" />
        </rule>
    </navigation>
    

    It seems to me, the pure JavaEE works totaly different?

    JSF 2.0 supports implicit navigation which makes <navigation-rule> in faces-config.xml totally superfluous. The returned outcome will be implicitly treated as target view ID. You can perform a redirect by appending a faces-redirect=true parameter to the outcome query string. E.g.

    public String submit() {
        // ...
    
        return "/pages/index.xhtml?faces-redirect=true";
    }
    

    See also:

    • Communication in JSF 2.0
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a Java web app, using the Play! Framework . I'm hosting
I learned java generics some time ago, but now I'm learning collections and found
I'm building a web application right now for my company and for whatever reason,
I learned today that NetBeans 6.5 should have an on-the-fly compilation of (single) Java
I learned Java in college, and then I was hired by a C# shop
I learned a lot of Perl RegEx syntax rules, but probably the only way
I'm playing around with building a new web application using DB4O - piles of
Im building a codeigniter app which uses json_encode to provide ajax data in many
I'm building an application that needs to open self-signed HTTPS SSL URLs in java.
I'm building a interpreter/compiler for a school project (well now its turning into a

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.