• Post Reply Bookmark Topic Watch Topic
  • New Topic

Internal server error  RSS feed

Vasanthi Rudra Rudramuni
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have the tld, descriptor and the jsp file,please let me know why the error is coming
Content of test-taglib.tld
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- after this the default space is
A tag library from Core Servlets and JavaServer Pages,
<info>Simplest example: inserts one line of output</info>
<!-- Other tags defined later... -->

Content of the descriptor file RequiredTag.java
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class RequiredTag implements Tag
private PageContext pageContext;
private Tag parentTag;
public void setPageContext(PageContext pageContext){
this.pageContext = pageContext;
public void setParent(Tag parentTag){
this.parentTag = parentTag;
public Tag getParent(){
return this.parentTag;
public int doStartTag() throws JspException{
JspWriter out = pageContext.getOut();
out.print("<font color='#ff0000'>*</font>");
}catch(Exception e){
throw new JspException("error in RequiredTag.doStartTag()");
return SKIP_BODY;
public int doEndTag() throws JspException{
return EVAL_PAGE;
public void release(){}

Content of the TestTaglib.jsp
<%@ taglib prefix="test" uri="test-taglib.tld" %>
Name:<test:required /><input type=text name="name">
Password:<test:required /><input type=password name="password">
I am getting internal server error 500, please help why this error is coming
Amer Khan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<?xml version="1.0" encoding="ISO-8859-1" ?>
add specification of its DTD here.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!