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

  • SEARCH
  • Home
  • 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 6656215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:36:57+00:00 2026-05-26T01:36:57+00:00

I have this jsp page with some conditions : <% if (filterPresent.equals(true) && !selectedFilterCategory.isEmpty()){

  • 0

I have this jsp page with some conditions :

<%      
        if (filterPresent.equals("true") && !selectedFilterCategory.isEmpty()){
%>
        <c:if test="${entry.category eq param.selectedFilterCategory}">
<%
        }
%>
                RENDER A TABLE WITH ITEMS

<%
        if ( filterPresent.equals("true") && !selectedFilterCategory.isEmpty() ) {
%>
        </c:if>
<%
       }
%>

If that filterPresent value is true I want only some items to be displayed(those that match the category). If it is not present I want to display all the items.

The error I’m getting is :

An error occurred at line: 48 in the jsp file: /jsp//ejbChildRule.jsp
Syntax error, insert "while ( Expression ) ;" to complete BlockStatements
45: %>
46:             <c:if test="${entry.category eq param.selectedFilterCategory}">
47: <%
48:             }
49: %>
50:                 <tr class="<%=currentBackground%>">
51:                             <td  class="<%=currentBackground%>" align="left" valign="middle" nowrap>

Can I achieve what I want in this manner ?

  • 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-26T01:36:58+00:00Added an answer on May 26, 2026 at 1:36 am

    you should NOT use any scriptlets, except under very urgent circumstances.

    Instead of <%=currentBackground%> you may use :

    • request.setAttribute(“currentBackground”, yourObject) inside your Java beans
    • or useBean with getter/setter

    then properly use Expression Language with ${currentBackground} to fetch yourObject.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been facing some serious issues while executing this particular JSP page. CODE
I have this simple Jsp page: <%@ page language=java import=java.awt.Color%> <% Color background =
I have this application I'm developing in JSP and I wish to export some
i have this tag as input tag: <a href=controller.jsp?sid=127490C88DB5&R=35144 class=11-link-dkred-bold><b>Mr. John Q. Anderson&nbsp;&nbsp;&nbsp;MBA 1977
I have one form in JSP. I have some input fields in that page,
this is a newbie question for you guys. In file /home/myhome/apache-tomcat-6.0.29/webapps/view/test.jsp I have <link
I have a JSP page which uses some kind of JSTL statment to refer
I have a jsp page that is trying to reference some user defined classes.
i have some checkbox in my jsp page. there are some othe textfields in
Right now I have a JSP page that allows to sort some items, when

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.