Solved

"if" tag without strut

Posted on 2009-07-02
7
451 Views
Last Modified: 2013-11-24
I've saw that in struts we've a "<s:if". Because I don't use strut, how to do it? I've many case where it would be very usefull!
0
Comment
Question by:Nargzul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 450 total points
ID: 24764955
Use the JSTL tags?

<c:if  should work



http://java.sun.com/products/jsp/jstl/
0
 
LVL 1

Author Comment

by:Nargzul
ID: 24766307
I've tried but I've some problem:

Caused by: org.apache.jasper.JasperException: /Menu.jsp(10,62) PWC6314: According to the TLD, the attribute test is not a deferred-value or deferred-method, but the specified value contains a #-expression

with this code:


    <c:if test="#{sessionInformations.authentificationUser}">
        
    </c:if>

Open in new window

0
 
LVL 1

Author Comment

by:Nargzul
ID: 24766485
I've change the # by $ and it works. can someone explain me why?
    <c:if test="${!sessionInformations.authentificationUser}">
 
    </c:if>

Open in new window

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:serrutom
ID: 24767741
Use following:
<h:panelGroup rendered="${!sessionInformations.authentificationUser}">
   ...
</h:panelGroup>

Open in new window

0
 
LVL 1

Author Comment

by:Nargzul
ID: 24767866
It's not only for display element, I've by exemple "jsf:forward" elements.

As I've said it's work now, can you just say me why we must use a $ and not a # like I've done since there
0
 
LVL 7

Assisted Solution

by:gudii9
gudii9 earned 50 total points
ID: 24768317
usually expression language, jstl tags etc use $ related syntax...
0
 
LVL 1

Author Comment

by:Nargzul
ID: 24768630
Strange, I've used the #{} since there and this is the first time I've this problem.

Thank you
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question