Title: RE: taglibs
Are you in production with 1.3.8 ?
Otherwize I would strongly suggest that you update your server to a later version.
If the problems persists, please package it into a WAR and include it in a reply so that we can try it out.
WR
-----Ursprungligt meddelande-----
Från: Grant Doran [mailto:[EMAIL PROTECTED]]
Skickat: den 30 januari 2001 14:56
Till: Orion-Interest
Ämne: RE: taglibs

I had this problem early on.
Go back to basics to start with.
Your first step is to refer to the class directly and not through a jar file.

Try this:

1. Get rid of the <taglib> tag in the web.xml
2. Change the URI in the taglib.tld to:  <uri/>
3. When using the TAGLLIB directive in the JSP, refer to it using a relative or vitrual URL that you know is correct.
    eg: <%@ taglib uri="/taglib/jet.tld" prefix="jet" %>

This should work.
One of the problems that I've found is that using more elegant referencing to tags and taglibraries is not portable.
For instance, when I tried to port our EAR file to Weblogic 6.0, I spent the best part of a day trying to get the taglibrary to work even though the whole application runs fine on Orion.

By the time I had written Weblogic off, their support people finally got back to me with a "this is a known issue" (read BUG!).

Anyway, keep it simple to start with and that means using URIs instead of relying on aliasing mechanisms that Orion or J2EE provide.

Grant Doran
Principle Architect
iLaunch inc.
http://www.ilaunch.com/


-----Original Message-----
From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 31 January, 2001 12:24 AM
To: Orion-Interest
Subject: taglibs


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