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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:22:33+00:00 2026-05-23T16:22:33+00:00

Does anyone has uses jsp debug helper page that can be dropped into any

  • 0

Does anyone has uses jsp debug helper page that can be dropped into any webapp or included from within another jsp page to view header, req and session attributes?

can you please share if possible ? It will be a great help for many

  • 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-23T16:22:34+00:00Added an answer on May 23, 2026 at 4:22 pm
    • Drop pageDebugger.jsp in you webapp
    • Access the page directly or include from another jsp like, layout.jsp to show this details on every page
    • This page Lists following in a table
      • Request Parameters
      • Page scoped attributes and values
      • Request scoped attributes and values
      • Session scoped attributes and values
      • Application scoped attributes and values
      • Request headers
      • All Spring beans defined in the scope
      • Option to search for a resource on the classpath
    • Dependency on spring framework is optional remove it if you dont use

    pageDebugger.jsp

    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <html>
    <head>
    <style type="text/css">
    td {
        word-wrap: break-word;
    }
    </style>
    </head>
    <body>
    <table width="100%" border="1" cellpadding="0" cellspacing="0"
        style="table-layout: fixed;">
        <colgroup>
            <col width="500">
        </colgroup>
        <tr>
            <th colspan="2">
            <h3>attributes in $paramValues</h3>
            </th>
        </tr>
        <c:forEach var="entry" items="${paramValues}">
            <tr>
                <td><c:out value="${entry.key}" /></td>
                <td><c:forEach var="item" items="${entry.value}"
                    varStatus="status">
                    <pre><c:out value="${item}" /></pre>
                    <c:if test="${not status.last}">
                        <br />
                    </c:if>
                </c:forEach></td>
            </tr>
        </c:forEach>
        <tr>
            <th colspan="2">
            <h3>attributes in $requestScope</h3>
            </th>
        </tr>
        <c:forEach var="entry" items="${requestScope}">
            <tr>
                <td><c:out value="${entry.key}" /></td>
                <td><pre><c:out value="${entry.value}" /></pre></td>
            </tr>
        </c:forEach>
        <tr>
            <th colspan="2">
            <h3>attributes in $sessionScope</h3>
            </th>
        </tr>
        <c:forEach var="entry" items="${sessionScope}">
            <tr>
                <td><c:out value="${entry.key}" /></td>
                <td><pre><c:out value="${entry.value}" /></pre></td>
            </tr>
        </c:forEach>
        <tr>
            <th colspan="2">
            <h3>attributes in $pageScope</h3>
            </th>
        </tr>
        <c:forEach var="entry" items="${pageScope}">
            <tr>
                <td><c:out value="${entry.key}" /></td>
                <td><pre><c:out value="${entry.value}" /></pre></td>
            </tr>
        </c:forEach>
        <tr>
            <th colspan="2">
            <h3>attributes in $headerValues</h3>
            </th>
        </tr>
        <c:forEach var="entry" items="${headerValues}">
            <tr>
                <td><c:out value="${entry.key}" /></td>
                <td><c:forEach var="item" items="${entry.value}"
                    varStatus="status">
                    <pre><c:out value="${item}" /></pre>
                    <c:if test="${not status.last}">
                        <br />
                    </c:if>
                </c:forEach></td>
            </tr>
        </c:forEach>
        <tr>
            <th colspan="2">
            <h3>attributes in $applicationScope</h3>
            </th>
        </tr>
        <c:forEach var="entry" items="${applicationScope}">
            <tr>
                <td><c:out value="${entry.key}" /></td>
                <td><pre><c:out value="${entry.value}" /></pre></td>
            </tr>
        </c:forEach>
        <tr>
            <th colspan="2">
            <h3>System Properties</h3>
            </th>
        </tr>
        <tr>
            <th>Key</th>
            <th>Value</th>
        </tr>
        <%@page import="java.util.Map"%>
        <%@page import="java.util.Set"%>
        <%@page import="java.util.Properties"%>
        <%@page import="java.util.Arrays"%>
        <%
            Properties p = System.getProperties();
            Set<Map.Entry<Object, Object>> set = p.entrySet();
            for (Map.Entry<Object, Object> e : set) {
        %>
        <tr>
            <td><%=e.getKey()%></td>
            <td><%="".equals(e.getValue()) ? "&nbsp;" : e.getValue()%></td>
            <%
                }
            %>
        </tr>
        <tr>
            <th colspan="2">
            <h3>Spring Beans</h3>
            </th>
        </tr>
        <%@page import="org.springframework.web.context.WebApplicationContext"%>
        <%@page
            import="org.springframework.web.context.support.WebApplicationContextUtils"%>
        <%@page import="org.springframework.core.io.Resource"%>
        <%
            try {
                WebApplicationContext springContext = WebApplicationContextUtils
                        .getWebApplicationContext(config.getServletContext());
                if (springContext != null) {
                    String[] beanNames = springContext.getBeanDefinitionNames();
                    Arrays.sort(beanNames);
                    for (String beanName : beanNames) {
                        String className = springContext.getType(beanName)
                                .getName();
        %>
        <tr>
            <td><%=beanName%></td>
            <td><%=className%></td>
        </tr>
        <%
            }
        %>
        <tr>
            <th colspan="2">
            <h3>Spring Resources</h3>
            </th>
        </tr>
        <tr>
            <th colspan="2">
            <form><input name="resources" size="50"/></form>
            </th>
        </tr>
    
        <%
            String resourceNames = request.getParameter("resources");
                    if (resourceNames != null) {
                        Resource[] resources = springContext
                                .getResources(resourceNames);
                        for (Resource r : resources) {
        %>
        <tr>
            <td><%=r.getFilename()%></td>
            <td><%=r.getURI()%></td>
        </tr>
        <%
            }
                    }
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        %>
    
    
    </table>
    </body>
    </html>
    

    Additionally if you have option to modify web.xml, have a look at these that can also be used to monitor / profile active http session attributes

    http://code.google.com/p/sessionmon/

    http://messadmin.sourceforge.net/

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

Sidebar

Related Questions

Does anyone here has any experience on how to send HTML emails that renders
Hi does anyone know I can display the icon of a file that has
Does anyone has sources for visual explanations of algorithms (or maths) that is even
Does anyone has any insight on organizing sqlalchemy based projects? I have many tables
Does anyone know of a jQuery plugin that has 'helpers' or extensions like those
Does anyone know if the iPad has any limitations on the canvas tag? Currently
Does anyone know any resources for the WebDeploy API? Has anyone used it? I've
Does anyone has a good solution for a C# version of the C++ __FUNCTION__
Does anyone has the code to a full working example of slartoolkit ( http://slartoolkit.codeplex.com/
Has anyone ever tested, or does anyone know, the performance differences of these two

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.