Hi

I am trying hard to get started with tag libraries, but for some reason I
keep getting an empty "HTTP 500 Internal server error" page when I call the
JSP page which uses my tag library - and the error is not explained in
Orion's log files.
I get the error when I try to use my tags - not when I reference the
library. I feel confident that my reference to the taglib in my JSP is
correct, because using a reference to an unexisting taglib results in an
error. But as soon as I call a tag from the library i get the error - i.e.
when writing something like <mytaglib:helloWorld>.

Below is a thorough description of the situation - any comments / thoughts
would be appreciated.

R.



Here is my setup:

============== the server ===============
Orion 1.3.8 running on Windows 2000 Professional

============== the tag ==================
public class HelloWorldTag extends TagSupport {

        public int doEndTag() throws JspException {
                try {
                        pageContext.getOut().write("The Tag says hello world!");
                }
                catch(java.io.IOException e) {
                        throw new JspTagException("IO Error: " + e.getMessage());
                }
                return EVAL_PAGE;
        }
}

============== web.xml ==================
        ...
        <taglib>
                <taglib-uri>jet</taglib-uri>
                <taglib-location>/WEB-INF/lib/taglib.jar</taglib-location>
        </taglib>
        ...

============== test.jsp =================
....
<%@ taglib uri = "jet" prefix = "jet" %>
....
<p>
        <jet:helloWorld>
</p>
....

============= taglib.tld ================
....
<taglib>
        <tlibversion>1.0</tlibversion> <jspversion>1.1</jspversion>
        <shortname>jet</shortname>
        <uri>http://www.orionserver.com/tutorials/mytags.jar</uri>
        <info>My first Tag library</info>

        <tag>
                <name>helloWorld</name>
                <tagclass>dk.rockit.jet.HelloWorldTag</tagclass>
                <bodycontent>empty</bodycontent>
                <info>A Hello World tag</info>
        </tag>
....

============ taglib.jar ================
meta-inf/taglib.tld
dk/rockit/jet/HelloWorldTag.class


Reply via email to