troubleshooting Question

how to write an if statement in a .jsp page

Avatar of Nemetona
Nemetona asked on
JSP
15 Comments2 Solutions591 ViewsLast Modified:
Hi

I am trying to test for the name of the current database from a .jsp page.

When I use ="<c:out value='${dbname}'/> it displays the name of my database on the page but when I try
    <c:if test="<c:out value='${dbname}'/>='mydatabasename'"> it does not work.

Can I combing the c:If test with the c: out value?

When I tried it as
<c:if test="'${dbname}'=='mydatabasename'> it did not work.

Can anyone shed any light for me, please
ASKER CERTIFIED SOLUTION
Sathish David Kumar N
Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 15 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros