Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

error while compiling  RSS feed

gaurav chhabra
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello sir
i m using tomcat and new to JSTL , sir i have my JSP file as follows ...


<!-- JAI SHRI RAM -->
<%@ taglib uri="first_taglib.tld" prefix="ram" %>





<H1><ram:sita /></H1>


now i have my .TLD file as follows ........


<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
<!-- a tag library descriptor -->


A tag library from Core Servlets and JavaServer Pages,


<info>Simplest example: inserts one line of output</info>

<!-- Other tags defined later... -->


and my class file is as follows .......


import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;

public class t2 extends TagSupport {
public int doStartTag() {
try {
JspWriter out = pageContext.getOut();
out.print("Custom tag example " +
} catch(IOException ioe) {
System.out.println("Error in ExampleTag: " + ioe);

i have complied my file and get the class file successfuly and i have all the files in tomcat4.1\webapps\root\ .but when i am running it through browser then it is giving the error in the JSP file i.e ts_final, that it is unable to compile .... please tell me that why this error is coming/..

thanks for help
Jeremy Wilson
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On first access the jsp is compiled by the container to basically a servlet. If it cannot do this you get that error. Make sure the java home and classpath is set correctly so that tomcat has access to the jdk.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!