- This topic has 1 reply, 2 voices, and was last updated 19 years, 12 months ago by Scott Anderson.
-
AuthorPosts
-
Robert SimmonsMemberGreetings.
I have a JSTL JSP page that works just fine. However, it wont validate at all, instead it underlines just about everything, performs slow and when I try to validate I get errors. The code and the errors follow.
All my libraries are int hte project, and like I said everything works in the actual Tomcat 5.0 container but it just doesnt validate and that is exceedingly annoying. I would like to be able to use myeclipse to edit my jsps but right now it is a major pain.
— Robert
errors
Severity Description Resource In Folder Location Creation Time 2 cannot access javax.servlet.Servlet: file javax\servlet\Servlet.class not found. NOTE: No JSP line number was avaliable so line 1 was used for the marker. AdminSubscriptions.jsp Candied Services/JSPs line 1 05 January 2005 18:04:31 2 cannot find symbol: symbol : class HttpServletRequest. NOTE: No JSP line number was avaliable so line 1 was used for the marker. AdminSubscriptions.jsp Candied Services/JSPs line 1 05 January 2005 18:04:31 2 cannot find symbol: symbol : class HttpServletResponse. NOTE: No JSP line number was avaliable so line 1 was used for the marker. AdminSubscriptions.jsp Candied Services/JSPs line 1 05 January 2005 18:04:31 2 cannot find symbol: symbol : class ServletException. NOTE: No JSP line number was avaliable so line 1 was used for the marker. AdminSubscriptions.jsp Candied Services/JSPs line 1 05 January 2005 18:04:31 2 package javax.servlet.http does not exist: import javax.servlet.http.*;. NOTE: No JSP line number was avaliable so line 1 was used for the marker. AdminSubscriptions.jsp Candied Services/JSPs line 1 05 January 2005 18:04:31 2 package javax.servlet does not exist: import javax.servlet.*;. NOTE: No JSP line number was avaliable so line 1 was used for the marker. AdminSubscriptions.jsp Candied Services/JSPs line 1 05 January 2005 18:04:31
source
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <%@ page language="java" import="java.util.*"%> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> <%@ taglib prefix="cs" uri="http://www.jambit.com/taglibs/bmw/candy/CandiedServices" %> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="eng"> <head> <title>Administer Candied Services Subscriptions</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> <!-- Forward to the subscriber Editing page--> <c:if test="${!empty param['edit']}"> </c:if> <!-- Destroy a subscriber. --> <c:if test="${!empty param['destroy']}"> <cs:destroySubscription targetID="${param['selectedID']}"/> <hr/> <b>Destroyed Subscription:</b> <br/> ID = <c:out value="${param['selectedID']}"/><br/> <hr/> </c:if> <!--Create a new Subscription. --> <c:if test="${!empty param['create']}"> <cs:createSubscription var="neoSubID" name="${param['neo.name']}" description="${param['neo.description']}"/> <hr/> <b>Created Subscription:</b> <br/> ID = <c:out value="${neoSubID}"/><br/> Name = <c:out value="${param['newsub.name']}"/><br/> Description = <c:out value="${param['newsub.description']}"/><br/> <hr/> </c:if> <center> <h1>Administer Candied Services Subscriptions </h1> </center> <hr/> <cs:listSubscriptions var="subs"/> <form name="manage" action="AdminSubscriptions.jsp" method="post"> <table border=1 cellspacing=0 cellpadding=2 width="90%" > <tr> <th></th> <th align="center">ID</th> <th align="center">Name</th> <th align="center">Description</th> </tr> <c:forEach var="subID" items="${subs}"> <cs:subscriptionInfo targetID="${subID}" nameVar="subName" descriptionVar="subDesc"/> <tr> <td width="1" height="1" valign="middle"> <input type="radio" name="selectedID" value="<c:out value="${subID}"/>"/> </td> <td width="*"><c:out value="${subID}"/></td> <td width="*"><c:out value="${subName}"/></td> <td width="*"><c:out value="${subDesc}"/></td> </tr> </c:forEach> </table> <input type="submit" name="edit" value="Edit"/> <input type="submit" name="destroy" value="destroy"/> </form> <h3>Create a New Subscription</h3> <form name="create" action="AdminSubscriptions.jsp" method="post"> <input type="text" name="neo.name" maxlength="15" size="15"> <input type="text" name="neo.description" maxlength="256" size="40"> <input type="submit" name="create" value="Create"><br/> </form> </body> </html>
Scott AndersonParticipantRobert,
From the errors it appears your project build path isn’t correct. Please check Properties > Java Build Path > Libraries and make sure that all the libs in WEB-INF/lib are on the build path. Adding any that aren’t and cleaning/rebuilding the project should resolve the issue.
-
AuthorPosts