Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Taglib with weblogic 6.0

Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using weblogic 6.0. i want to use taglib with my jsp ... so i created a simple tag & am trying to use it ... but it dosnt work. Plz let me know where am i doing anything wrong......
Here is my web.xml
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN" "">
here is my hello.tld
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"

I created following folder under WEB-INF
in this folder i have hello.tld
i have my Hello.class under this dir. is as under

package com.hello;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
* This is a simple tag example to show how content is added to the
* output stream when a tag is encountered in a JSP page.
public class Hello extends TagSupport {
private String name=null;
* Getter/Setter for the attribute name as defined in the tld file
* for this tag
public void setName(String value){
name = value;
public String getName(){
* doStartTag is called by the JSP container when the tag is encountered
public int doStartTag() {
try {
JspWriter out = pageContext.getOut();
out.println("<table border='1'>");
if (name != null)
out.println("<tr><td> Hello " + name + " </td></tr>");
out.println("<tr><td> Hello World </td></tr>");
} catch (Exception ex) {
throw new Error("All is not well in the world.");
// Must return SKIP_BODY because we are not supporting a body for this
// tag.
return SKIP_BODY;
here is the Hello.jsp which uses hello taglib...
<%@ taglib uri="hello" prefix="sample" %>
<sample:hello name="Sue"/>
but then also i get the error :
weblogic.servlet.jsp.JspException : could not parse deployment descripter: cannot resolve 'hello' into a valid tag library...
can u plz help me out....
thnks in advance
    Bookmark Topic Watch Topic
  • New Topic