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 8848641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:28:10+00:00 2026-06-14T12:28:10+00:00

Continued from this question: Set array values in javascript from JSTL code . I

  • 0

Continued from this question: Set array values in javascript from JSTL code.

I tried using the solution the other member of the forum suggested to me,but it still does not seem to be working.As in,the line:

sessionId.push("${id}");

on the Eclipse IDE becomes:

 sessionId.push("");

on the browser(when I do a view-source).

That member also told me there could be a null element or empty string in the array,does the array:

"["Environment", "1", "Education", "1", "Disaster_Accident", "1", "Hospitality_Recreation", "2", "Labor", "1", "Human Interest", "3"]"

considered to have a null element or string?

  • 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-06-14T12:28:11+00:00Added an answer on June 14, 2026 at 12:28 pm

    You probably have a syntax error somewhere. Please try using this demonstration page. It works for me in IE8 browser.

    <%@ page import="java.util.*,java.io.*" %>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
    <%
       //scriptlet is for testing,
       List<String> list = new ArrayList<String>();
       list.add("Environment");
       list.add("1");
       list.add("Education");
       list.add("1");
       list.add("Disaster_Accident");
       request.setAttribute("arrayList", list);
    %>
    <script>
    var sessionId = [];
    <c:forEach items="${arrayList}" var="id">
           sessionId.push("${id}");
    </c:forEach>
    alert(sessionId);
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This continues from a previous question . I tried the suggested fix to check
I have asked this question before with other adapters like SimpleAdapter but the solution
I'm writing my code in Haxe. This is quite irrelevant to the question though,
I have set up debugging in Eclipse for native code using the Android NDK
This is a follow up from this question, Lock Cells after Data Entry .
This is a continue question from here The case is : after i add
Not sure it is clear from this question title what I mean, so here
I have been researching this for a while but got no convinced answer. From
Recently I had this question , and everything worked properly until I sent it
Inspired by the question Difference in initalizing and zeroing an array in c/c++ ?

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.