taglib

Liferay Taglib import not working in JSP

倖福魔咒の 提交于 2019-12-10 10:05:43
问题 I'm having trouble importing the liferay taglibs in one of my JSP pages, no idea what I'm doing wrong. I did the exact same thing in previous projects, but now for some reason it's not working. My code to import: <%@ taglib uri="http://liferay.com/tld.ui" prefix="liferay-ui" %> The syntax error I'm getting: The absolute uri: http://liferay.com/tld.ui cannot be resolved in either web.xml or the jar files deployed with this application I tried to google this problem quite extensively, but to no

How to reference Facelets taglib in JAR from Facelets and web.xml?

偶尔善良 提交于 2019-12-09 12:11:37
问题 I am using the Apache MyFaces Commons Validator TagLib. How should i add this to my web.xml? The commons JAR is downloaded and resolved through Maven. XHTML (I think this is correct): <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.prime.com.tr/ui" **xmlns:mcv="http://myfaces.apache.org/commons/validators"**> web.xml: <context-param> <!-- To add additional tab libs --> <param-name>facelets

Very simple custom taglib function not working

点点圈 提交于 2019-12-08 19:34:08
问题 I'm banging my head over why my custom taglib function isn't working. The example is using Math.cos and Math.sin . Here's the class: package foo.tags; public class Math { public java.lang.Double cos(java.lang.Double value) { return java.lang.Math.cos(value); } public java.lang.Double sin(java.lang.Double value) { return java.lang.Math.sin(value); } } Here's the .tld file: <taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=

Problem with Ruby + rtaglib gem

天涯浪子 提交于 2019-12-08 10:19:46
问题 I need to read ID3 tags from MP3 files, so i did some research and found that rtaglib is the way to go. The other plugins seems outdated, i tried them anyways but none of them work for me. After installed the rtaglib gem (the ruby binding for TagLib http://developer.kde.org/~wheeler/taglib.html#bindings) i just can't make it work. I tried adding both the gem to the gemfile and install it with sudo gem install rtaglib. I get the response like it's installed, but after that when i tried to

Java EE 7 : Can not find the tag library descriptor for “http://java.sun.com/jsp/jstl/core”

元气小坏坏 提交于 2019-12-08 09:19:41
问题 I am trying to use the following tag lib in my JSP page : <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> But Eclipse shows me this error : Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core" I am already having JSTL in my classpath using this dependency : <dependency> <artifactId>javaee-api</artifactId> <version>7.0</version> <scope>provided</scope> </dependency> I use WildFly 9. I have the same problem with these 2 other taglibs : <%@ taglib

How do I add another tag to be parsed as embedded JS in a tmLanguage file?

风格不统一 提交于 2019-12-08 06:09:07
问题 Back Story (not really important but it frames the question) I have a TagLib in a JSP that takes its contents and wraps its containing code in a script block (it does much more but for the sake of the question it is not important). For example: <aui:script use="some-module"> //my code </aui:script> will be served as <script type="text/javascript> AUI().use('sub-module', function(A) { // my code } </script> The Question I would like all the code in between <aui:script use="things"></aui:script

JSP 2 tag files “/WEB-INF/tags” not found

…衆ロ難τιáo~ 提交于 2019-12-07 19:34:46
问题 I want to write some jsp tag files for my application. I followed this article: http://www.techrepublic.com/article/an-introduction-to-jsp-20s-tag-files/ However, I'm stuck, when I open a jsp page that has this line: <%@ taglib prefix="h" uri="/WEB-INF/tags"%> I get an exception. HTTP Status 500 - /test.jsp (line: 8, column: 41) File "/WEB-INF/tags" not found org.apache.jasper.JasperException: /test.jsp (line: 8, column: 41) File "/WEB-INF/tags" not found org.apache.jasper.compiler

Invalid tagdir attribute while web-fragment is used

邮差的信 提交于 2019-12-07 19:24:58
问题 I am using web-fragment feature to maintain my JSPs and tags in a jar, and using this approach, my JSP pages are unable to find the tagdir, and cause "The value of the tagdir attribute for this tag library is invalid." Here is the structure in my jar. META-INF -- resources -- WEB-INF -- tags -- mytag.tag -- mypage.jsp -- web-fragment.xml In mypage.jsp, I specify the taglib as following: And I got these errors: mypage.jsp:7:4: The taglib directive must specify either the "uri" or "tagdir"

JSPX namespaces not visible for EL functions?

旧巷老猫 提交于 2019-12-07 18:23:36
问题 I'm attempting to use JSPX (pure XML syntax for JSP) and running into what seems like it should work, but doesn't. I'm importing taglibs using namespace declarations in the jsp:root element, then using these later on for elements as well as EL functions: <jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/ xmlns:c="urn:jsptld:/WEB-INF/tld/c.tld" xmlns:fn="urn:jsptld:/WEB-INF/tld/fn.tld"> ... <c:if test="${fn:length(list) > 0"> ... </c:if> ... </jsp:root> I get an exception saying "The

NullPointerException using liferay-ui taglib

只愿长相守 提交于 2019-12-07 16:57:33
问题 I'm trying to use the liferay-ui:icon-help tag in my (Liferay 6.1) portlet, but adding <liferay-ui:icon-help message="help me"/> to my edit.jsp gives me ERROR [render_portlet_jsp:154] java.lang.NullPointerException at com.liferay.taglib.ui.IconHelpTag.processEndTag(IconHelpTag.java:57) I'm sure I imported the taglib correctly because other tags such as liferay-ui:calendar work just fine. Did I forget anything? edit: IconHelpTag.java:57 suggests that there's something wrong involving the theme