I am trying to execute some simple jstl program. But tomcat throwing error. Please anyone tell me how to solve this error.
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 2 in the jsp file: /datetime.jsp Generated servlet error: C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\simpletag\org\apache\jsp\datetime_jsp.java:70: cannot resolve symbol symbol : class DateTimeTag1 location: class org.apache.jsp.datetime_jsp DateTimeTag1 _jspx_th_ch06_datetime12_0 = new DateTimeTag1(); ^
An error occurred at line: 2 in the jsp file: /datetime.jsp Generated servlet error: C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\simpletag\org\apache\jsp\datetime_jsp.java:70: cannot resolve symbol symbol : class DateTimeTag1 location: class org.apache.jsp.datetime_jsp DateTimeTag1 _jspx_th_ch06_datetime12_0 = new DateTimeTag1(); ^ 2 errors
<?xml version="1.0" encoding="UTF-8" ?> <taglib xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd" version="2.1"> <description> Tag library for Professional JSP 2.1, Chapter 6. </description> <jsp-version>2.1</jsp-version> <tlib-version>1.0</tlib-version> <short-name>ch06</short-name> <uri>http://www.apress.com/projsp/ch06</uri> <tag> <name>datetime</name> <tag-class>DateTimeTag</tag-class> <body-content>empty</body-content>
<description> Outputs the current date and time to the page. </description> </tag> </taglib> ---------------------------------------- datetime.jsp
<%@ taglib uri="/WEB-INF/tlds/ch06.tld" prefix="ch06" %> The current date and time is <ch06 atetime/> ------------------------------------------
Dhananjay Inamdar
Ranch Hand
Joined: Jan 27, 2003
Posts: 130
posted
0
Hello Gajanan,
Just want to clarify that you have to keep compiled version of java Soruce file, .class file in WEB-INF/Classes folder. You have mentioned that DateTimeTag.java file is in simpletag\WEB-INF\classes directory. If not already then please compile this DateTimeTag.java and keep DateTimeTag.class file in simpletag\WEB-INF\classes directory.
Thanks
Just like you, struggeling to get the right solutions!<br /> <br />Sun Certified Java Programmer 1.5<br /> <br />Target - SCWCD
gajanan balshetwar
Greenhorn
Joined: Mar 06, 2007
Posts: 14
posted
0
Hello dhananjay, Thanks for reply.I compiled java file and kept in \WEB-INF\classes. All files kept in all specified location.There is no compile error in any file. These same problem occurs for other application.