Solved

"if" tag without strut

Posted on 2009-07-02
7
440 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
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Running Jira on Raspberry PI 2? 3 261
Hibernate Not Rolling Back When something fails in a stored procedure 2 51
@SBGen Method 3 37
arguments to jar 5 14
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now