- This topic has 7 replies, 3 voices, and was last updated 20 years, 6 months ago by
dsarris.
-
AuthorPosts
-
dsarrisMemberHi,
I am using Struts 1.2 and I have implemented a JSP page containg the <c:foreachtag>:
<%@ page language="java"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html:html locale="true"> <head> <html:base /> <title>displayCountries.jsp</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> </head> <body> <html:errors/> <table border="1" width="100%"> <tr> <th> CountryId </th> <th> CountryName </th> <th> </th> </tr> <c:forEach var="Country" items="${countryList.map.countries}"> <tr> <td> <c:out value="${Country.id}"/> </td> <td> <c:out value="${Country.countryName}"/> </td> <td> <html:form action="/selectCountry"> <table> <tr> <td> <html:text property="countryId" value="${Country.id}" /> </td> <td> <html:select property="maritalStatusId"> <html:optionsCollection name="athleteOption" property="maritalStatus" label="name" value="id"/> </html:select> </td> </tr> </table> <html:submit value="Select"/> </html:form> </td> </tr> </c:forEach> </table> </body> </html:html>
MyEclipse complais with the following error:
package org.apache.taglibs.standard.tag.rt.core does not exist: org.apache.taglibs.standard.tag.rt.core.ForEachTag _jspx_th_c_forEach_0 = (org.apache.taglibs.standard.tag.rt.core.ForEachTag) _jspx_tagPool_c_forEach_var_items.get(org.apache.taglibs.standard.tag.rt.core.ForEachTag.class);
However, if I ignore this error and deploy to JBoss, everything works OK.
How can solve this error?
January 3, 2005 at 3:17 pm #222121
GregMemberWhere are you seeing that error? error log, problems view, console output, in the editor annotations, or other?
January 8, 2005 at 3:10 am #222400
dsarrisMemberSorry for my late answer.
I am seeing it in the Problems View.
January 11, 2005 at 8:52 am #222529
dsarrisMemberAny suggestions? Is the problem reproducable?
January 11, 2005 at 9:22 am #222537
Riyad KallaMemberdsarris,
Most likely you forgot to add the jstl.jar and/or the standard.jar files to your Java Build Path for your project; and JBoss probably provides these files by default so when the app is deployed, it just uses the JBoss libraries.Is this the case?
January 11, 2005 at 10:08 am #222546
dsarrisMembernop.
I can see the jstl.jar, standard.jar files in the WEB-INF/lib directory.January 11, 2005 at 10:46 am #222548
Riyad KallaMemberThat doesn’t necessarily mean it is in your Build Path, please double check your Project Properties > Java Build Path > Libraries settings and see if jstl.jar and standard.jar are listed. If not, use Add JAR and add them then rebuild your project.
What version of the JSTL JARs are you using?
January 12, 2005 at 3:27 am #222585
dsarrisMemberOk. You were correct. The libs were in the deployment, but not at the project classpath. I added them and I have no problems.
Thanks
-
AuthorPosts