[
https://issues.apache.org/jira/browse/JCS-207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Reval Pal updated JCS-207:
--------------------------
Description:
The sample JCSAdmin.jsp on URL
https://raw.githubusercontent.com/apache/commons-jcs/master/commons-jcs-core/src/main/java/org/apache/commons/jcs3/admin/JCSAdmin.jsp
as referred to by https://commons.apache.org/proper/commons-jcs/faq.html
{quote}
Where can I get the admin jsp?
You can download the admin jsp here .
{quote}
Throws exception when running:
{code}
org.apache.jasper.JasperException: JBWEB004038: An exception occurred
processing JSP page /JCSAdmin.jsp at line 254
254
251: Retrieve (key) <input type="text" name="key">
252: (region) <select name="cacheName">
253: <%
254: CacheRegionInfo[] listSelect = (CacheRegionInfo[]) context.get(
"cacheInfoRecords" );
255: for (CacheRegionInfo record : listSelect)
256: {
257: %>
Caused by: java.lang.ClassCastException: java.util.LinkedList cannot be cast to
[Lorg.apache.commons.jcs3.admin.CacheRegionInfo;
at org.apache.jsp.JCSAdmin_jsp._jspService(JCSAdmin_jsp.java:389)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
{code}
which contains 3 bugs:
1)
{code} line 203 :
<%
CacheElementInfo[] list = (CacheElementInfo[]) context.get(
"elementInfoRecords" );
for (CacheElementInfo element : list)
{
%>
{code}
should be
{code}
<%
for (CacheElementInfo element :
(java.util.List<CacheElementInfo>)context.get( "elementInfoRecords" ))
{
%>
{code}
2)
{code} line 253
<%
CacheRegionInfo[] listSelect = (CacheRegionInfo[]) context.get(
"cacheInfoRecords" );
for (CacheRegionInfo record : listSelect)
{
{code}
should be
{code}
<%
for (CacheRegionInfo record : (java.util.List<CacheRegionInfo>)context.get(
"cacheInfoRecords" ))
{
{code}
3)
{code} line 279
<%
CacheRegionInfo[] list = (CacheRegionInfo[]) context.get(
"cacheInfoRecords" );
for (CacheRegionInfo record : listSelect)
{
%>
{code}
should be
{code}
<%
for (CacheRegionInfo record : (java.util.List<CacheRegionInfo>)context.get(
"cacheInfoRecords" ))
{
%>
{code}
(*) Also some styling nitpicking:
{code} line 229
<pre>
<%=stats%>
</pre>
{code}
should be
{code}
<pre>
<%=stats%>
</pre>
{code}
(removes the spaces in the rendered page).
was:
The sample JCSAdmin.jsp on URL
https://raw.githubusercontent.com/apache/commons-jcs/master/commons-jcs-core/src/main/java/org/apache/commons/jcs3/admin/JCSAdmin.jsp
as referred to by https://commons.apache.org/proper/commons-jcs/faq.html
{quote}
Where can I get the admin jsp?
You can download the admin jsp here .
{quote}
currently contains
{code:java}
{code}
But throws exception when running:
{code}
org.apache.jasper.JasperException: JBWEB004038: An exception occurred
processing JSP page /JCSAdmin.jsp at line 254
254
251: Retrieve (key) <input type="text" name="key">
252: (region) <select name="cacheName">
253: <%
254: CacheRegionInfo[] listSelect = (CacheRegionInfo[]) context.get(
"cacheInfoRecords" );
255: for (CacheRegionInfo record : listSelect)
256: {
257: %>
Caused by: java.lang.ClassCastException: java.util.LinkedList cannot be cast to
[Lorg.apache.commons.jcs3.admin.CacheRegionInfo;
at org.apache.jsp.JCSAdmin_jsp._jspService(JCSAdmin_jsp.java:389)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
{code}
which contains 3 bugs:
1) {code}
{code}
should be
{code}
{code}
2)
{code}
{code}
should be
{code}
{code}
3)
{code}
{code}
should be
{code}
{code}
Also some styling:
{code}
{code}
should be
{code}
{code}
> JCSAdmin.jsp throws ClassCastException java.util.LinkedList cannot be cast to
> [Lorg.apache.commons.jcs3.admin.CacheRegionInfo
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: JCS-207
> URL: https://issues.apache.org/jira/browse/JCS-207
> Project: Commons JCS
> Issue Type: Bug
> Components: Documentation
> Affects Versions: jcs-3.0
> Reporter: Reval Pal
> Priority: Minor
>
> The sample JCSAdmin.jsp on URL
> https://raw.githubusercontent.com/apache/commons-jcs/master/commons-jcs-core/src/main/java/org/apache/commons/jcs3/admin/JCSAdmin.jsp
> as referred to by https://commons.apache.org/proper/commons-jcs/faq.html
> {quote}
> Where can I get the admin jsp?
> You can download the admin jsp here .
> {quote}
> Throws exception when running:
> {code}
> org.apache.jasper.JasperException: JBWEB004038: An exception occurred
> processing JSP page /JCSAdmin.jsp at line 254
> 254
> 251: Retrieve (key) <input type="text" name="key">
> 252: (region) <select name="cacheName">
> 253: <%
> 254: CacheRegionInfo[] listSelect = (CacheRegionInfo[]) context.get(
> "cacheInfoRecords" );
> 255: for (CacheRegionInfo record : listSelect)
> 256: {
> 257: %>
> Caused by: java.lang.ClassCastException: java.util.LinkedList cannot be cast
> to [Lorg.apache.commons.jcs3.admin.CacheRegionInfo;
> at org.apache.jsp.JCSAdmin_jsp._jspService(JCSAdmin_jsp.java:389)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
> at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
> {code}
> which contains 3 bugs:
> 1)
> {code} line 203 :
> <%
> CacheElementInfo[] list = (CacheElementInfo[]) context.get(
> "elementInfoRecords" );
> for (CacheElementInfo element : list)
> {
> %>
> {code}
> should be
> {code}
> <%
> for (CacheElementInfo element :
> (java.util.List<CacheElementInfo>)context.get( "elementInfoRecords" ))
> {
> %>
> {code}
> 2)
> {code} line 253
> <%
> CacheRegionInfo[] listSelect = (CacheRegionInfo[]) context.get(
> "cacheInfoRecords" );
> for (CacheRegionInfo record : listSelect)
> {
> {code}
> should be
> {code}
> <%
> for (CacheRegionInfo record :
> (java.util.List<CacheRegionInfo>)context.get( "cacheInfoRecords" ))
> {
> {code}
> 3)
> {code} line 279
> <%
> CacheRegionInfo[] list = (CacheRegionInfo[]) context.get(
> "cacheInfoRecords" );
> for (CacheRegionInfo record : listSelect)
> {
> %>
> {code}
> should be
> {code}
> <%
> for (CacheRegionInfo record :
> (java.util.List<CacheRegionInfo>)context.get( "cacheInfoRecords" ))
> {
> %>
> {code}
> (*) Also some styling nitpicking:
> {code} line 229
> <pre>
> <%=stats%>
> </pre>
> {code}
> should be
> {code}
> <pre>
> <%=stats%>
> </pre>
> {code}
> (removes the spaces in the rendered page).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)