Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strike>That can happen when the JSF tags are not recognized and parsed as such and it effectively get rendered as plain text wherein all EL expressions are evaluated as value expressions. It would in your case basically print the returned value of <code>#{user.logout()}</code>. But while EL does that, the method's logic is of course invoked. </p> <p>If you remove the <code>action</code> attribute and open the page in browser and do a <em>View Source</em>, then you'll see an unparsed <code>&lt;h:commandLink&gt;</code> tag instead of the generated HTML <code>&lt;a&gt;</code> element.</p> <p>Make sure that you have the <code>h:</code> XML namespace definied on the right URI in the root tag of the view file.</p> <pre><code>xmlns:h="http://java.sun.com/jsf/html" </code></pre> <p></strike></p> <hr> <p><strong>Update</strong>: the <code>&lt;h:link&gt;</code> isn't intented to invoke bean actions. It's intented as a pure GET link. The <code>outcome</code> is <a href="http://docs.oracle.com/javaee/6/javaserverfaces/2.1/docs/vdldocs/facelets/h/link.html" rel="nofollow">per specification</a> evaluated as a value expression, not as a method expression. The <code>outcome</code> must represent a view ID where the link has to navigate to. When the EL evaluates your method as a value expression, it's of course immediately invoked. Just keep using <code>&lt;h:commandLink&gt;</code> in combination with a redirect. Additional advantage is that this isn't bookmarkable nor searchbot-crawlable.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload