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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:49:00+00:00 2026-05-23T11:49:00+00:00

I am pretty new in Java EE, i am trying use that .war file

  • 0

I am pretty new in Java EE, i am trying use that .war file http://community.jboss.org/wiki/ThreadDumpJSP , but it seems index.jsp file doesn’t show variable, I see only ${thr.name} ${thr.state} ${thr.priority} ${thr.daemon} I am tested it on jboss and tomcat 6

edit:

here is code:

package org.jboss.varia.threaddump.ThreadDumpBean;

import java.io.Serializable;import java.util.*;

public class ThreadDumpBean implements Serializable {

    private final Map traces;

    public ThreadDumpBean() {traces = new TreeMap(THREAD_COMP);traces.putAll(Thread.getAllStackTraces());}

    public Collection getThreads() {return traces.keySet();}

    public Map getTraces() {return traces;}

    /*** Compare the threads by name and id.*/
    private static final Comparator THREAD_COMP = new Comparator() {  
        public int compare(Thread o1, Thread o2) {    
            int result = o1.getName().compareTo(o2.getName());    
            if (result == 0) {      
                Long id1 = o1.getId();      
                Long id2 = o2.getId();      
                return id1.compareTo(id2);    
            }    
            return result;  
        }};
}

and .jsp:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

<jsp:useBean id="threadDump"
             class="org.jboss.varia.threaddump.ThreadDumpBean"
             scope="request"/>

<html>
<body>
<h2>Thread Summary</h2>
<table cellpadding="5" cellspacing="5">
  <tr>
    <th>Thread</th>
    <th>State</th>
    <th>Priority</th>
    <th>Daemon</th>
  </tr>
  <c:forEach items="${threadDump.threads}" var="thr">
    <tr>
      <td><c:out value='<a href="#${thr.id}">${thr.name}</a>' escapeXml="false"/></td>
      <td><c:out value="${thr.state}"/></td>
      <td><c:out value="${thr.priority}"/></td>
      <td><c:out value="${thr.daemon}"/></td>
    </tr>
  </c:forEach>
</table>

<h2>Thread Stack Traces</h2>
<c:forEach items="${threadDump.stackTraces}" var="trace">
  <h4><c:out value='<a name="${trace.key.id}">${trace.key}</a>' escapeXml="false"/></h4>
  <pre>
  <c:forEach items="${trace.value}" var="traceline">
      at <c:out value="${traceline}"/></c:forEach>
  </pre>
</c:forEach>

</body>
</html>
  • 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-23T11:49:01+00:00Added an answer on May 23, 2026 at 11:49 am

    If you deploy the JSP page on Tomcat 6 you need to enable the expression language to use it (for reasons of backwards compatibility this is disabled by default). That can either be done by creating a web.xml file where the version of the Servlet spec is set to at least 2.4. Your web.xml file should look something like this:

    <web-app id="TreadDumpApp" version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
    
    </web-app>
    

    To use EL outside JSP tag attributes, you need to add event more magic to the web.xml

    <web-app {...magic from above...}>    
    <jsp-property-group>  
    <url-pattern>/*</url-pattern>  
    <el-ignore>false</el-ignore>
    </jsp-property-group>
    </web-app>
    

    You should also be able to force this single page to allow EL, but adding this declaration in the top of the page:

    <%@ page isELIgnored ="false" %> 
    

    Yeah, that double negation is quite elegant, eh? 😉

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

Sidebar

Related Questions

I'm pretty new to Java ME and i'm trying to use Microlog to handle
I'm trying to use YUI compressor in a maven goal, but I'm pretty new
I'm trying to use java to read a string from a file that was
Im pretty new to Java Web Services, but I cant find a good explanation
I am new to Java world but I am pretty good at using Flex,
This is probably a silly question, but I'm pretty new to Java and I
I'm new to Ruby coming from Java. I'm trying to make a http get
I am pretty new to the whole Java and OSGi world and I have
I am completely new to android, and pretty much a Java newb. I have
I am pretty new to php, but I am learning! I have a simple

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.