troubleshooting Question

Struts Missing Taglib ?

Avatar of OMyStuckAgin
OMyStuckAgin asked on
Web Development
3 Comments1 Solution800 ViewsLast Modified:
I have the following jsp page created using the jsp editor in WSAD 5.1. The editor says the page is clean, that is, there are no warnings or errors. However when I display the form on the server I get the following message.

Error 500: Error while defining class: org.apache.taglibs.standard.tag.rt.core.ForEachTag This error indicates that the class: Error while defining class: org.apache.taglibs.standard.tag.common.core.ForEachSupport This error indicates that the class: javax.servlet.jsp.jstl.core.LoopTagSupport could not be located while defining the class: org.apache.taglibs.standard.tag.common.core.ForEachSupport This is often caused by having the class at a higher point in the classloader hierarchy Dumping the current context classloader hierarchy: ==> indicates defining classloader *** indicates classloader where the missing class could have been found ==>[0] com.ibm.ws.classloader.CompoundClassLoader@398a398a.

I double checked and the referenced tag libs are included in the WEB-INF/lib..

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/c-rt.tld" prefix="c" %>

. am I missing a taglib ? or is there another issue ?.



<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/c-rt.tld" prefix="c" %>
<%@ page import = "pweh.otb.beans.*" %>
<%@ page import = "pweh.otb.beans.org.lookups.*" %>


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ page
language="java"
contentType="text/html; charset=ISO-8859-1"
%>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="GENERATOR" content="IBM WebSphere Studio" />

<title>OT Plan Report Screen</title>
<link href="css/dashboardstyles.css" rel="stylesheet" type="text/css" />
<script>
             function viewDetail(name) {
                   window.open(name,"newWin","width=600,height=400,top=100,left=150,menubar=no,toolbar=no,scrollbars=yes");
            }
</script>

</head>

<body>
<p class="banner">
 <img src="images/report.jpg" /> <br />
</p>

<table border="1" cellspacing="1" cellpadding="1">

      <tr class="bg0">
            <td colspan="2"></td>
            <td colspan="3" align="center">Regular Hour</td>
            <td></td>
            <td colspan="2" align="center">AWW (M,T,W,Th)</td>
            <td></td>
            <td colspan="2" align="center">AWW (F,S,Su)</td>
            <td></td>
            <td colspan="2" align="center">AWW (M,T,W)</td>
            <td></td>
            <td colspan="2" align="center">AWW (M,S,Su)</td>
      </tr>

      <tr class="bg0">
            <td colspan="2" align="center">Dept</td>
            <td align="center">1st Shift</td>
            <td align="center">2nd Shift</td>
            <td align="center">3rd Shift</td>


            <td></td>
            <td align="center">1st Shift</td>
            <td align="center">2nd Shift</td>

            <td></td>
            <td align="center">1st Shift</td>
            <td align="center">2nd Shift</td>

            <td></td>
            <td align="center">1st Shift</td>
            <td align="center">2nd Shift</td>

            <td></td>
            <td align="center">1st Shift</td>
            <td align="center">2nd Shift</td>


      </tr>


<c:forEach items="${businessUnit.getdepts()}" var="dept">
            <tr class="bg3">
            
            <c:choose>
                  <c:when test="${dept.type == 'dept'}">
                        <td> &nbsp; </td>
                        <td align="left" colspan="2"><b><c:out value="${dept.getdeptname()}"/</b></td>
                  </c:when>                                    
                  <c:otherwise>
                        <td align="left" colspan="2"><b><c:out value="${dept.getbuname()}"/</b></td>
                  </c:otherwise>
            </c:choose>
            
            
            
            <c:forEach items="${dept.getschedules()}" var="sched">
                  <c:forEach items="${sched.getshifts()}" var="shift">                  
                                       
                           <c:choose>
                                    <c:when test="${shift.status == 'green'}">
                                          <td align="center"><img src="images/greendot.gif" /></td>
                                    </c:when>
                                    <c:when test="${shift.status == 'yellow'}">
                                          <td align="center"><img src="images/yellowdot.gif" /></td>
                                    </c:when>                                    
                                    <c:otherwise>
                                          <td align="center"><img src="images/reddot.gif" /></td>
                                    </c:otherwise>
                              </c:choose>
                              
                        </c:forEach>
                  </c:forEach>                  
                  </tr>
      </c:forEach>
</table>
</body>
</html>

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros