Re: Jakarta Taglibs Installation
Excellent idea. I should have a look at the document type definition for the web.xml file to find out where exactly I should place the context-param element and its contents, and then perhaps also validate the resulting XML file with an XML validator with the DTD also supplied as input. The DTD does not come with tomcat or taglibs but... $ find /usr/local/jakarta-tomcat-4.1.24 -name '*dtd' $ find /usr/local/jakarta-taglibs -name '*dtd' $ The file /usr/local/jakarta-tomcat-4.1.24/webapps/ROOT/WEB-INF/web.xml reveals its location: http://java.sun.com/dtd/web-app_2_3.dtd OK, I validated the page versus the DTD using the XML validator at http://validator.w3.org/ and found the page to be valid XML, that is the XML file is well-formed and validates versus the DTD. I also checked it at the following site: http://www.stg.brown.edu/cgi-bin/xmlvalid/xmlvalid.pl and obtained the same results (except for the following warning which I suppose is nothing to worry about): line 2, web.xml: warning (562): can't resolve Public ID: -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN Both validators nevertheless downloaded the DTD from the contents of the second string specified in the document type declaration and did find the document to conform to the DTD, so that was not the problem. The error message reported is clearly wrong. Regards, Neil On Sat, 5 Jul 2003, N. Chen wrote: do you have taglib define in the web.xml file? might be the ordering of your other directives, try looking at the DTD. nick On Fri, 4 Jul 2003, Neil Zanella wrote: Well, now I am not entirely sure that it is mandatory, because I have a JSP page such that when I change the WEB-INF/web.xml to include the following lines (for connecting to a database which is not yet on the network): context-param param-name javax.servlet.jsp.jstl.sql.dataSource /param-name param-value jdbc:postgresql:foodb,org.postgresql.Driver,johndoe /param-value /context-param and save the .jsp file without making any modifications to it, I get the following error, but the error is not caused by a change in the .jsp file; it's caused by the above lines: org.apache.jasper.JasperException: This absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application This is clearly wrong!!! BTW I have not been able to connect to the data source yet so I'm not sure yet if that would fix it, but the error is clearly the wrong error, and is introduced by the above lines. Why is this happening? (almost would seem like a bug: Tomcat 4.1.24) Neil On Mon, 30 Jun 2003, Shawn Bayern wrote: On Mon, 30 Jun 2003, [gb2312] guo yingshou wrote: If it is *mandatory*,why the web-app.dtd still specifiy an optional taglib element?Just for backward compatibility? That's part of it, and it's also necessary for cases where a tag library doesn't package its JAR in the format necessary for it to work. Note that it's mandatory for the container to support it; it's not mandatory for a taglib author to deploy his or her libraries in this fashion (though it's probably a good idea in all cases). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta Taglibs Installation
do you have taglib define in the web.xml file? might be the ordering of your other directives, try looking at the DTD. nick On Fri, 4 Jul 2003, Neil Zanella wrote: Well, now I am not entirely sure that it is mandatory, because I have a JSP page such that when I change the WEB-INF/web.xml to include the following lines (for connecting to a database which is not yet on the network): context-param param-name javax.servlet.jsp.jstl.sql.dataSource /param-name param-value jdbc:postgresql:foodb,org.postgresql.Driver,johndoe /param-value /context-param and save the .jsp file without making any modifications to it, I get the following error, but the error is not caused by a change in the .jsp file; it's caused by the above lines: org.apache.jasper.JasperException: This absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application This is clearly wrong!!! BTW I have not been able to connect to the data source yet so I'm not sure yet if that would fix it, but the error is clearly the wrong error, and is introduced by the above lines. Why is this happening? (almost would seem like a bug: Tomcat 4.1.24) Neil On Mon, 30 Jun 2003, Shawn Bayern wrote: On Mon, 30 Jun 2003, [gb2312] guo yingshou wrote: If it is *mandatory*,why the web-app.dtd still specifiy an optional taglib element?Just for backward compatibility? That's part of it, and it's also necessary for cases where a tag library doesn't package its JAR in the format necessary for it to work. Note that it's mandatory for the container to support it; it's not mandatory for a taglib author to deploy his or her libraries in this fashion (though it's probably a good idea in all cases). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta Taglibs Installation
Well, now I am not entirely sure that it is mandatory, because I have a JSP page such that when I change the WEB-INF/web.xml to include the following lines (for connecting to a database which is not yet on the network): context-param param-name javax.servlet.jsp.jstl.sql.dataSource /param-name param-value jdbc:postgresql:foodb,org.postgresql.Driver,johndoe /param-value /context-param and save the .jsp file without making any modifications to it, I get the following error, but the error is not caused by a change in the .jsp file; it's caused by the above lines: org.apache.jasper.JasperException: This absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application This is clearly wrong!!! BTW I have not been able to connect to the data source yet so I'm not sure yet if that would fix it, but the error is clearly the wrong error, and is introduced by the above lines. Why is this happening? (almost would seem like a bug: Tomcat 4.1.24) Neil On Mon, 30 Jun 2003, Shawn Bayern wrote: On Mon, 30 Jun 2003, [gb2312] guo yingshou wrote: If it is *mandatory*,why the web-app.dtd still specifiy an optional taglib element?Just for backward compatibility? That's part of it, and it's also necessary for cases where a tag library doesn't package its JAR in the format necessary for it to work. Note that it's mandatory for the container to support it; it's not mandatory for a taglib author to deploy his or her libraries in this fashion (though it's probably a good idea in all cases). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta Taglibs Installation
I should point out, in the interest of intellectual honesty, that I didn't lick this off the grass. I learned it after reading a well-written explanation by Shawn Bayern. Proper credit should be given where it belongs. - MOD --- guo yingshou [EMAIL PROTECTED] wrote: Thanks for your info. I never do that before.Maybe I need to have a detailed look at the sections you mentions if I have time later.After a glimpse of these lines,a question pops up my mind: If it is *mandatory*,why the web-app.dtd still specifiy an optional taglib element?Just for backward compatibility? Anyway,thanks for clarification. --- Shawn Bayern [EMAIL PROTECTED] µÄÕýÎÄ£º On Mon, 30 Jun 2003, [gb2312] guo yingshou wrote: Are you sure it works on all j2ee complaint servlet engine? The behavior is mandated by sections 7.2.1 and 7.3.1 of the JSP 1.2 specification, so all compliant containers support it; if a product claiming compliance doesn't support it, then it's a bug. Shawn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? ÍøÁµµÄÚ¹ÊÍ£ºÕæÇ黹ÊÇ·Å×Ý£¿ http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/netlove - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta Taglibs Installation
On Mon, 30 Jun 2003, [gb2312] guo yingshou wrote: If it is *mandatory*,why the web-app.dtd still specifiy an optional taglib element?Just for backward compatibility? That's part of it, and it's also necessary for cases where a tag library doesn't package its JAR in the format necessary for it to work. Note that it's mandatory for the container to support it; it's not mandatory for a taglib author to deploy his or her libraries in this fashion (though it's probably a good idea in all cases). -- Shawn Bayern JSTL in Action http://www.jstlbook.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jakarta Taglibs Installation
Hello, I have installed Jakarta Tomcat 4.1.24 and Jakarta Taglibs 1.0.3, both of which support the JSP specification. I found the README file /usr/local/jakarta-taglibs/standard-1.0.3/README to be close to useless: it seems to me that copying the files standard-doc.war and standard-examples.war to the WEB-INF/classes is almost irrelevant: what do I do once I copy them? How do I test them? With a JavaServer page with the following directive: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % I was getting the following error: uri (http://java.sun.com/jstl/core) cannot be resolved and then also the error: org.apache.jasper.JasperException: File /WEB-INF/c.tld not found Hence I fixed it with: $ cp /usr/local/jakarta-taglibs/standard-1.0.3/tld/c.tld \ ~/public_html/WEB-INF This is undocumented though. Is it what I'm supposed to do? Seems strange to me that I would have to copy the file to my web applications' WEB-INF directory: if it's the same for everyone why can't it be used as a system file, without the need to copy it? Thanks, Neil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta Taglibs Installation
Have you configured the taglib in your web.xml using taglib element ? --- Neil Zanella [EMAIL PROTECTED] Hello, I have installed Jakarta Tomcat 4.1.24 and Jakarta Taglibs 1.0.3, both of which support the JSP specification. I found the README file /usr/local/jakarta-taglibs/standard-1.0.3/README to be close to useless: it seems to me that copying the files standard-doc.war and standard-examples.war to the WEB-INF/classes is almost irrelevant: what do I do once I copy them? How do I test them? With a JavaServer page with the following directive: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % I was getting the following error: uri (http://java.sun.com/jstl/core) cannot be resolved and then also the error: org.apache.jasper.JasperException: File /WEB-INF/c.tld not found Hence I fixed it with: $ cp /usr/local/jakarta-taglibs/standard-1.0.3/tld/c.tld \ ~/public_html/WEB-INF This is undocumented though. Is it what I'm supposed to do? Seems strange to me that I would have to copy the file to my web applications' WEB-INF directory: if it's the same for everyone why can't it be used as a system file, without the need to copy it? Thanks, Neil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/netlove - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta Taglibs Installation
On Sun, 29 Jun 2003, [gb2312] guo yingshou wrote: Have you configured the taglib in your web.xml using taglib element ? No I have not because: 1. I have not seen anything about this in the documentation. 2. I have read that Tomcat 4.1.24 has an autodetection feature which makes this unnecessary. In case 2 is not true, then where can I find documentation on the syntax of this taglib XML element and what attributes/contents should I set for this element? Thanks, Neil --- Neil Zanella [EMAIL PROTECTED] µÄÕýÎÄ£º Hello, I have installed Jakarta Tomcat 4.1.24 and Jakarta Taglibs 1.0.3, both of which support the JSP specification. I found the README file /usr/local/jakarta-taglibs/standard-1.0.3/README to be close to useless: it seems to me that copying the files standard-doc.war and standard-examples.war to the WEB-INF/classes is almost irrelevant: what do I do once I copy them? How do I test them? With a JavaServer page with the following directive: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % I was getting the following error: uri (http://java.sun.com/jstl/core) cannot be resolved and then also the error: org.apache.jasper.JasperException: File /WEB-INF/c.tld not found Hence I fixed it with: $ cp /usr/local/jakarta-taglibs/standard-1.0.3/tld/c.tld \ ~/public_html/WEB-INF This is undocumented though. Is it what I'm supposed to do? Seems strange to me that I would have to copy the file to my web applications' WEB-INF directory: if it's the same for everyone why can't it be used as a system file, without the need to copy it? Thanks, Neil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? ÍøÁµµÄÚ¹ÊÍ£ºÕæÇ黹ÊÇ·Å×Ý£¿ http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/netlove - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta Taglibs Installation
Have a look at servlet specification. --- Neil Zanella [EMAIL PROTECTED] On Sun, 29 Jun 2003, [gb2312] guo yingshou wrote: Have you configured the taglib in your web.xml using taglib element ? No I have not because: 1. I have not seen anything about this in the documentation. 2. I have read that Tomcat 4.1.24 has an autodetection feature which makes this unnecessary. In case 2 is not true, then where can I find documentation on the syntax of this taglib XML element and what attributes/contents should I set for this element? Thanks, Neil --- Neil Zanella [EMAIL PROTECTED] Hello, I have installed Jakarta Tomcat 4.1.24 and Jakarta Taglibs 1.0.3, both of which support the JSP specification. I found the README file /usr/local/jakarta-taglibs/standard-1.0.3/README to be close to useless: it seems to me that copying the files standard-doc.war and standard-examples.war to the WEB-INF/classes is almost irrelevant: what do I do once I copy them? How do I test them? With a JavaServer page with the following directive: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % I was getting the following error: uri (http://java.sun.com/jstl/core) cannot be resolved and then also the error: org.apache.jasper.JasperException: File /WEB-INF/c.tld not found Hence I fixed it with: $ cp /usr/local/jakarta-taglibs/standard-1.0.3/tld/c.tld \ ~/public_html/WEB-INF This is undocumented though. Is it what I'm supposed to do? Seems strange to me that I would have to copy the file to my web applications' WEB-INF directory: if it's the same for everyone why can't it be used as a system file, without the need to copy it? Thanks, Neil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/netlove - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/netlove - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta Taglibs Installation
Well, I just had a look at the instructions at: http://jakarta.apache.org/taglibs/doc/standard-doc/standard/GettingStarted.html and they say to copy the contents of directory: /usr/local/jakarta-taglibs/standard-1.0.3/lib to the WEB-INF/lib directory. That worked, but once again, it seems wasteful. If every user did this for their own web application directory then there would be a lot of unnecessary duplication. Did you say that I can avoid this by using the taglib element in my web.xml (server.xml?). Thanks, Neil (Now I'll also have a look at: http://jakarta.apache.org/taglibs/binarydist.html)_ I cannot understand why these jakarta packages can't just distribute whatever installation instructions are necessary in the README file like just about any other software does it. ... On Sun, 29 Jun 2003, [gb2312] guo yingshou wrote: Have a look at servlet specification. --- Neil Zanella [EMAIL PROTECTED] µÄÕýÎÄ£º On Sun, 29 Jun 2003, [gb2312] guo yingshou wrote: Have you configured the taglib in your web.xml using taglib element ? No I have not because: 1. I have not seen anything about this in the documentation. 2. I have read that Tomcat 4.1.24 has an autodetection feature which makes this unnecessary. In case 2 is not true, then where can I find documentation on the syntax of this taglib XML element and what attributes/contents should I set for this element? Thanks, Neil --- Neil Zanella [EMAIL PROTECTED] µÄÕýÎÄ£º Hello, I have installed Jakarta Tomcat 4.1.24 and Jakarta Taglibs 1.0.3, both of which support the JSP specification. I found the README file /usr/local/jakarta-taglibs/standard-1.0.3/README to be close to useless: it seems to me that copying the files standard-doc.war and standard-examples.war to the WEB-INF/classes is almost irrelevant: what do I do once I copy them? How do I test them? With a JavaServer page with the following directive: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % I was getting the following error: uri (http://java.sun.com/jstl/core) cannot be resolved and then also the error: org.apache.jasper.JasperException: File /WEB-INF/c.tld not found Hence I fixed it with: $ cp /usr/local/jakarta-taglibs/standard-1.0.3/tld/c.tld \ ~/public_html/WEB-INF This is undocumented though. Is it what I'm supposed to do? Seems strange to me that I would have to copy the file to my web applications' WEB-INF directory: if it's the same for everyone why can't it be used as a system file, without the need to copy it? Thanks, Neil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? ÍøÁµµÄÚ¹ÊÍ£ºÕæÇ黹ÊÇ·Å×Ý£¿ http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/netlove - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? ÍøÁµµÄÚ¹ÊÍ£ºÕæÇ黹ÊÇ·Å×Ý£¿ http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/netlove - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta Taglibs Installation
Actually, step 3. is unnecessary. When you create the JAR file for your handler, the TLD file goes inside it. It's already got the URI string you should use in your JSP. When the JSP compiler goes looking for your TLD, it'll find it in the JAR because it's already in the CLASSPATH. That's the way I always do it with JSTL. I like it, because it doesn't violate the DRY principle. Why have the URI in the TLD and the WAR file? Don't Repeat Yourself. JMHO - MOD --- guo yingshou [EMAIL PROTECTED] wrote: to develop and use jsp custome tag library,one usually follows this roadmap: 1.write your tag handler(s). 2.write your tld file(s); 3.in your web.xml,declare that you want to use the lib in this way: web-app ... taglib taglib-uri*/taglib-uri taglib-location***/taglib-location /taglib /web-app 4.in you jsp page: %@ taglib uri=*** prefix=*** % that's all. --- Neil Zanella [EMAIL PROTECTED] µÄÕýÎÄ£º Well, I just had a look at the instructions at: http://jakarta.apache.org/taglibs/doc/standard-doc/standard/GettingStarted.html and they say to copy the contents of directory: /usr/local/jakarta-taglibs/standard-1.0.3/lib to the WEB-INF/lib directory. That worked, but once again, it seems wasteful. If every user did this for their own web application directory then there would be a lot of unnecessary duplication. Did you say that I can avoid this by using the taglib element in my web.xml (server.xml?). Thanks, Neil (Now I'll also have a look at: http://jakarta.apache.org/taglibs/binarydist.html)_ I cannot understand why these jakarta packages can't just distribute whatever installation instructions are necessary in the README file like just about any other software does it. ... On Sun, 29 Jun 2003, [gb2312] guo yingshou wrote: Have a look at servlet specification. --- Neil Zanella [EMAIL PROTECTED] µÄÕýÎÄ£º On Sun, 29 Jun 2003, [gb2312] guo yingshou wrote: Have you configured the taglib in your web.xml using taglib element ? No I have not because: 1. I have not seen anything about this in the documentation. 2. I have read that Tomcat 4.1.24 has an autodetection feature which makes this unnecessary. In case 2 is not true, then where can I find documentation on the syntax of this taglib XML element and what attributes/contents should I set for this element? Thanks, Neil --- Neil Zanella [EMAIL PROTECTED] µÄÕýÎÄ£º Hello, I have installed Jakarta Tomcat 4.1.24 and Jakarta Taglibs 1.0.3, both of which support the JSP specification. I found the README file /usr/local/jakarta-taglibs/standard-1.0.3/README to be close to useless: it seems to me that copying the files standard-doc.war and standard-examples.war to the WEB-INF/classes is almost irrelevant: what do I do once I copy them? How do I test them? With a JavaServer page with the following directive: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % I was getting the following error: uri (http://java.sun.com/jstl/core) cannot be resolved and then also the error: org.apache.jasper.JasperException: File /WEB-INF/c.tld not found Hence I fixed it with: $ cp /usr/local/jakarta-taglibs/standard-1.0.3/tld/c.tld \ ~/public_html/WEB-INF This is undocumented though. Is it what I'm supposed to do? Seems strange to me that I would have to copy the file to my web applications' WEB-INF directory: if it's the same for everyone why can't it be used as a system file, without the need to copy it? Thanks, Neil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? ÍøÁµµÄÚ¹ÊÍ£ºÕæÇ黹ÊÇ·Å×Ý£¿ http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/netlove - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _
Re: Jakarta Taglibs Installation
On Sun, 29 Jun 2003, Michael Duffy wrote: Actually, step 3. is unnecessary. When you create the JAR file for your handler, the TLD file goes inside it. It's already got the URI string you should use in your JSP. When the JSP compiler goes looking for your TLD, it'll find it in the JAR because it's already in the CLASSPATH. Indeed, under JSP 1.2, the taglib element is unnecessary. As for duplicating the JAR files for each application, it's simply the cost -- and an exceedingly minor one in any reasonable environment -- of appropriate architecture. The advantages of including JAR files with an individual application include - a clear statement of the dependencies of the application and the ability to easily WAR it up and redeploy elsewhere - automatic detection of the JAR files' taglibs - isolation of 'static' data from other applications because a classloader specific to the web application loads the JAR files' classes; this can be important for security and for troubleshooting Shawn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta Taglibs Installation
Are you sure it works on all j2ee complaint servlet engine? thanks. --- Michael Duffy [EMAIL PROTECTED] Actually, step 3. is unnecessary. When you create the JAR file for your handler, the TLD file goes inside it. It's already got the URI string you should use in your JSP. When the JSP compiler goes looking for your TLD, it'll find it in the JAR because it's already in the CLASSPATH. That's the way I always do it with JSTL. I like it, because it doesn't violate the DRY principle. Why have the URI in the TLD and the WAR file? Don't Repeat Yourself. JMHO - MOD --- guo yingshou [EMAIL PROTECTED] wrote: to develop and use jsp custome tag library,one usually follows this roadmap: 1.write your tag handler(s). 2.write your tld file(s); 3.in your web.xml,declare that you want to use the lib in this way: web-app ... taglib taglib-uri*/taglib-uri taglib-location***/taglib-location /taglib /web-app 4.in you jsp page: %@ taglib uri=*** prefix=*** % that's all. --- Neil Zanella [EMAIL PROTECTED] Well, I just had a look at the instructions at: http://jakarta.apache.org/taglibs/doc/standard-doc/standard/GettingStarted.html and they say to copy the contents of directory: /usr/local/jakarta-taglibs/standard-1.0.3/lib to the WEB-INF/lib directory. That worked, but once again, it seems wasteful. If every user did this for their own web application directory then there would be a lot of unnecessary duplication. Did you say that I can avoid this by using the taglib element in my web.xml (server.xml?). Thanks, Neil (Now I'll also have a look at: http://jakarta.apache.org/taglibs/binarydist.html)_ I cannot understand why these jakarta packages can't just distribute whatever installation instructions are necessary in the README file like just about any other software does it. ... On Sun, 29 Jun 2003, [gb2312] guo yingshou wrote: Have a look at servlet specification. --- Neil Zanella [EMAIL PROTECTED] On Sun, 29 Jun 2003, [gb2312] guo yingshou wrote: Have you configured the taglib in your web.xml using taglib element ? No I have not because: 1. I have not seen anything about this in the documentation. 2. I have read that Tomcat 4.1.24 has an autodetection feature which makes this unnecessary. In case 2 is not true, then where can I find documentation on the syntax of this taglib XML element and what attributes/contents should I set for this element? Thanks, Neil --- Neil Zanella [EMAIL PROTECTED] Hello, I have installed Jakarta Tomcat 4.1.24 and Jakarta Taglibs 1.0.3, both of which support the JSP specification. I found the README file /usr/local/jakarta-taglibs/standard-1.0.3/README to be close to useless: it seems to me that copying the files standard-doc.war and standard-examples.war to the WEB-INF/classes is almost irrelevant: what do I do once I copy them? How do I test them? With a JavaServer page with the following directive: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % I was getting the following error: uri (http://java.sun.com/jstl/core) cannot be resolved and then also the error: org.apache.jasper.JasperException: File /WEB-INF/c.tld not found Hence I fixed it with: $ cp /usr/local/jakarta-taglibs/standard-1.0.3/tld/c.tld \ ~/public_html/WEB-INF This is undocumented though. Is it what I'm supposed to do? Seems strange to me that I would have to copy the file to my web applications' WEB-INF directory: if it's the same for everyone why can't it be used as a system file, without the need to copy it? Thanks, === message truncated === _ Do You Yahoo!? http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/netlove - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta Taglibs Installation
On Mon, 30 Jun 2003, [gb2312] guo yingshou wrote: Are you sure it works on all j2ee complaint servlet engine? The behavior is mandated by sections 7.2.1 and 7.3.1 of the JSP 1.2 specification, so all compliant containers support it; if a product claiming compliance doesn't support it, then it's a bug. Shawn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta Taglibs Installation
Thanks for your info. I never do that before.Maybe I need to have a detailed look at the sections you mentions if I have time later.After a glimpse of these lines,a question pops up my mind: If it is *mandatory*,why the web-app.dtd still specifiy an optional taglib element?Just for backward compatibility? Anyway,thanks for clarification. --- Shawn Bayern [EMAIL PROTECTED] On Mon, 30 Jun 2003, [gb2312] guo yingshou wrote: Are you sure it works on all j2ee complaint servlet engine? The behavior is mandated by sections 7.2.1 and 7.3.1 of the JSP 1.2 specification, so all compliant containers support it; if a product claiming compliance doesn't support it, then it's a bug. Shawn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/netlove - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]