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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:46:34+00:00 2026-05-19T13:46:34+00:00

I’m doing a JSF2 project. I use mojarra 2.x, PrimeFaces 2.2RC2, Tomcat 6.x and

  • 0

I’m doing a JSF2 project. I use mojarra 2.x, PrimeFaces 2.2RC2, Tomcat 6.x and Google Guice.

  1. For the moment I use commandlink to navigate through my site, so everytime I want to reload, the navigator ask for resubmit value. I see on the net that it’s possible to redirect. Does it better to use outputlink or commandlink for navigation?

  2. Many times I use action with parameter like this:

    <:commandlink action="#{bean.doSomething(item)}" />
    

    This is good or bad ?

  3. Is there is some conventions in JSF for naming action, properties? Or what’s your convention?

  4. When I write a xhtml page, does it better to use only components or just when necessary ?

    Example

    #{bean.foo}
    

    or

    <h:outputText value="#{bean.foo}" />
    
  5. What about the use of JSTL tags like <c:if> ? I use some because I had some problems when I use <ui:fragment rendered=""> during restoring view.

  • 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-19T13:46:35+00:00Added an answer on May 19, 2026 at 1:46 pm
    1. <h:commandLink> fires a POST request. This makes no sense for page-to-page navigation. It’s not user friendly nor SEO friendly. Just use <h:outputLink>, <h:link> or even <a> which fires a plain HTTP GET request.

    2. If item is already present in the instance behind #{bean} then this is unnecessary. If it’s not, then it’s perfectly fine. You only need to keep in mind that your code is this way not backwards compatible on Servlet 2.5 containers anymore while JSF 2.0 itself is backwards compatible on Servlet 2.5. It’s namely a Servlet 3.0 / EL 2.2 feature (I only wonder how you get it to run on Tomcat 6. Aren’t you using Tomcat 7 or are you using JBoss EL?).

    3. I wouldn’t care that much, e.g. ProductManager, ProductController, Products, etc, as long as it is as much as possible self-documenting from the view side on. I.e. not #{pc.submit} or #{pd.column1}, but #{products.find} and #{product.name}.

    4. In Facelets, both are equally valid. Both are XML-escaped. The <h:outputText> only has the advantage that it allows easy access by UIViewRoot and adding attributes like styleClass, id, rendered, etc.

    5. As long as you use it only when you want to control how the view is built, not how view is rendered, then it’s perfectly fine. Note that those http://java.sun.com/jstl/core tags are provided by Facelets itself, not by good ol’ JSP JSTL JAR’s (which has /jsp in taglib URI).

    Related

    • When should I use h:outputLink instead of h:commandLink?
    • JSTL c:if inside JSF h:dataTable
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to clean up various Word 'smart' characters in user input, including but
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
i want to parse a xhtml file and display in UITableView. what is the
public static bool CheckLogin(string Username, string Password, bool AutoLogin) { bool LoginSuccessful; // Trim

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.