• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

error while compiling

Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.*;
import java.io.*;

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
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
Creativity is allowing yourself to make mistakes; art is knowing which ones to keep. Keep this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic