<%@ page import="java.lang.management.*, java.util.*" %><%  
response.setContentType("text/plain");  
Iterator iter = ManagementFactory.getMemoryPoolMXBeans().iterator();  
while(iter.hasNext()){  
    MemoryPoolMXBean item = (MemoryPoolMXBean) iter.next();  
      MemoryUsage mu = item.getUsage();  
      long used      = mu.getUsed();  
      long committed = mu.getCommitted();  
      long max       = mu.getMax();  
      %>  
MEMORY TYPE: <%=item.getName()%>  
Used:        <%=used%>  
Committed:   <%=used%>  
Max:         <%=max%>  
<%}%>