Thank you for your pations!


Kris Schneider schrieb:


As of JSP 1.2, the container makes packaged taglibs pretty easy to deal with.
For details, you really should check out the JSP spec (or get a decent book).
One of the things the container will do is inspect each JAR file in WEB-INF/lib
and look for TLD files in their /META-INF dirs. If a TLD contains a <uri>
element, then an implicit <taglib> element is automatically created. Most
packaged taglibs will document their official URIs, but you can always inspect
the TLD files if you need to.

As for whether or not to use the <jsp:root> element, that's totally up to you. I
just wanted to mention that you don't have to use it. An abbreviated example
from the JSP 2.0 spec:

<html xmlns="http://www.w3.org/1999/xhtml";
     xmlns:jsp="http://java.sun.com/JSP/Page";
     xmlns:c="http://java.sun.com/jsp/jstl/core";>
 ...
</html>

Quoting Tomasz Dreßler <[EMAIL PROTECTED]>:



Thank you for your answer.
It works. Can you help me understand why :)
Someone looks in all jar's for 'http://jakarta.apache.org/struts/tags-bean' namespace?
When I am use JSP 2.0 what I sould take instead of <jsp:root> element?
I use tiles so I can't take <html> as root element.


Greetings


Kris Schneider schrieb:




Try:

xmlns:bean="urn:jsptld:/WEB-INF/tags/struts-bean.tld"

But since JSP 1.2 you really don't need separate TLD files for packaged


taglibs


(like Struts and JSTL). This should also work:

xmlns:bean="http://jakarta.apache.org/struts/tags-bean";

Then you can remove the TLD files from your app as well as the <taglib>


elements
from your web.xml. Also note that as of JSP 2.0 you don't have to use


<jsp:root> for your document's root element.

Quoting Tomasz Dreßler <[EMAIL PROTECTED]>:





Hi!
I have problems to use the struts taglibs in jsp with xml syntax.

When I use
 <%@ taglib uri="/WEB-INF/tags/struts-bean.tld" prefix="bean" %>
the generated servlet contains the line
'_jspx_dependants.add("/WEB-INF/tags/struts-bean.tld")'
and everything is ok.

But with the following syntax the line
'_jspx_dependants.add("/WEB-INF/tags/struts-bean.tld")' disappeare
 <?xml version="1.0" encoding="UTF-8"?>

 <jsp:root version="1.2"
     xmlns:jsp="http://java.sun.com/JSP/Page";
     xmlns:c="http://java.sun.com/jsp/jstl/core";
     xmlns:bean="/WEB-INF/tags/struts-bean.tld">
         [...]

</jsp:root>

I use Apache Tomcat/5.0.18 and I have modifyed my web.xml:

 <web-app xmlns="http://java.sun.com/xml/ns/j2ee";
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
     http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4">
     [...]
 </web-app>


Any Idea?


Tomek







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to