-
FEATURED COMPONENTS
First time here? Check out the FAQ!
At first i have alreay read this - Developer reference The ZK User Interface Markup Language Processing Instructions The taglib Directive
But i cant edit /metainfo/tld/config.xml because its in zul.jar
So i tried:
<?taglib prefix="sec" uri="http://www.springframework.org/security/tags" ?>
org.zkoss.xel.XelException: Resource not found: http://www.springframework.org/security/tags
<?taglib uri="/WEB-INF/tld/security.tld" prefix="sec"?>
<sec:authorize ifAllGranted="ROLE_ADMIN"> <label value="${username }" /> <label value="${userRole }" /> </sec:authorize>
org.zkoss.lang.SystemException: org.xml.sax.SAXParseException: The prefix "sec" for element "sec:authorize" is not bound.
I'm having the same problem. According to the docs
<?taglib uri="/WEB-INF/tld/security.tld" prefix="sec"?>
should work. But I get the "not bound" error too. So there seems to be a bug.
I did go ahead and edit the config.xml and recreate zul.jar and use
<?taglib uri='http://www.springframework.org/security/tags' prefix='sec' ?>
which still results in
org.zkoss.xel.XelException: Resource not found: http://www.springframework.org/security/tags
BTW - I also tried:
<%@ taglib uri='http://www.springframework.org/security/tags' prefix='sec' %>
and got this error:
The markup in the document preceding the root element must be well-formed.
Any ideas?
Using zul within .jsp looks like a solution, however it it doesn't seem to work with ZK 3.6.1
Has anyone been able to get the spring security taglibs working? I can't even get eclipse to recognize the taglibs. I have redefined the zul.jar file as PeterKuo has suggested.. but still nothing. Am I missing something in the taglib redefinition?
Please follow the wiki
http://docs.zkoss.org/wiki/Developer_reference_The_ZK_User_Interface_Markup_Language_Processing_Instructions_The_taglib_Directive
If you want to load a TLD file from your Web application, you can specify the path as follows.
<?taglib uri="/WEB-INF/tld/my.tld" prefix="my"?>
hi ,
Me too facing the same problem.... i have a custom tld to be acessed in zul page(taglib uri).i have placed the tld in web-inf/tld/web/abc.tld. but its not working Can anyone please sugest me..... wht's the reason????
thanks in advance.......................
Regards
geet
hi PeterKuo,
If iam able to acess, then i would have not posted my problem.iam able to acess in jsp but not zul
Can u please go thru the code, and try to reslove,
this is my .tld file ,
<?xml version="1.0" encoding="ISO-8859-1" ?>
Asked: 2009-03-17 18:20:35 +0800
Seen: 4,349 times
Last updated: Oct 18 '12