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

[Servlet Error]-[End of content reached while more parsing required:tag nesting error  RSS feed

 
Ashok Haluvarthi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am trying to execute one simple TagLib in Websphere5.0 i am getting this error for tld pls any one encounter this error.
[Servlet Error]-[End of content reached while more parsing required: tag nesting error?]: org.apache.jasper.compiler.ParseException: End of content reached while more parsing required: tag nesting error?
at org.apache.jasper.compiler.JspReader.popFile(JspReader.java:293)
at org.apache.jasper.compiler.JspReader.hasMoreInput(JspReader.java(Compiled Code))
at org.apache.jasper.compiler.Parser.parse(Parser.java(Compiled Code))
at org.apache.jasper.compiler.Parser.parse(Parser.java(Inlined Compiled Code))
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java(Compiled Code))
at org.apache.jasper.compiler.Parser.parse(Parser.java(Compiled Code))
at org.apache.jasper.compiler.Parser.parse(Parser.java:1110)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1106...........................
My TLD is
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/dtd/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>fmt</short-name>
<tag>
<name>log</name>
<tag-class>com.mtvn.fms.tlp.FMS_TLP_Tag</tag-class>
<body-content>empty</body-content>
<attribute>
<name>value</name>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
</taglib>
JSP program
<%@ taglib prefix="fmt" uri="/WEB-INF/tlds/MyTagLib.tld" %>
<html>
<head>
<title>Simple TagLib Example</title>
</head>
<body>
<TABLE border=1 align="center">
<TR>
<TD>Basic Example on Tag Lib</TD>
<TD>ur Web Server is <fmt:log></TD>
<TD>By Ashok Haluvarthi</TD>
</TR>
</TABLE>
</body>
</html>
Handler class
package com.mtvn.fms.tlp;
/**
* Insert the type's description here.
* Creation date: (12/16/2003 8:26:18 PM)
* @author: Administrator
*/
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.*;
import java.net.*;

public class FMS_TLP_Tag extends TagSupport {
public int doStartTag() throws JspException{
try{
//Get the request object from the page context
HttpServletRequest request =(HttpServletRequest) pageContext.getRequest();
URL url= new URL("http", request.getServerName(),request.getServerPort(),"/");
URLConnection con= url.openConnection();
((HttpURLConnection) con).setRequestMethod("OPTIONS");
String sgWeb = con.getHeaderField("server");
//write it to output stream
JspWriter out = pageContext.getOut();
out.print(sgWeb);
}catch(IOException e){
throw new JspException(e.getMessage());
}
return SKIP_BODY;
}
}
 
Krishna Srinivasan
Ranch Hand
Posts: 1879
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u have made mistake on tld file.u check it properly.if u r not closing the end tag properly,it will give this error.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Krishna, one of the purposes of this fourm is to communicate JSP information and knowledge. The use of contraction like "u" from "you" get in the way of such communication. Please take the time to use real words rather than contractions like "u" in order to facilitate good communications in this forum.
thanks,
bear
JSP Forum Bartender
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!