jsp-tags

How to pre-compile jsp tag files?

删除回忆录丶 提交于 2019-12-10 11:49:24
问题 http://download.oracle.com/javaee/1.4/tutorial/doc/JSPTags6.html says: Tag files can also be compiled into Java classes and bundled as a tag library. This is useful when you wish to distribute a binary version of the tag library without the original source. If you choose this form of packaging, you must use a tool that produces portable JSP code that uses only standard APIs. How can i pre-compile them? I tried jspc but it failed : BUILD FAILED org.apache.jasper.JasperException: ... link.tagx

SetLocale did not work in jsp site to format currency in german

心已入冬 提交于 2019-12-09 16:53:38
问题 I'm confused with the jstl tag libs: I want to format a number to a currency with german style ... but everything I tried did not worked ... I found the following example but the output is the same -.- <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <html> <head> <title>format number</title> </head> <body> <c:set var="val" value="40.52" /> <p> Currency in USA

Adding Spring Security JspTagLib to a Freemarker template - issues with controller unit tests

怎甘沉沦 提交于 2019-12-08 17:56:09
问题 I have added Springs jsp security taglib to a freemarker template because I'm using freemarker for the view of my web app rather than jsps. For anyone searching for how to set this up, I found Adding spring library for usage of JSP Taglibs for security in Freemarker to be a very helpful question. In summary, add the following to the *.ftl file you wish to use the tags in: <#assign security=JspTaglibs["http://www.springframework.org/security/tags"] /> Then assuming you're using maven add the

Spring boot taglibs

谁说胖子不能爱 提交于 2019-12-08 17:28:22
问题 I am using Spring boot. I have a JSP page with the following tag libs: <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%> When loading my jsp page, I get the following error: The absolute uri: http://www.springframework.org/security/tags cannot be resolved in either web.xml or the jar files deployed with this application These are my POM dependencies: <dependencies> <dependency> <groupId>org

Display another jsp content in current jsp page upon a hyperlink click

拟墨画扇 提交于 2019-12-08 13:14:08
问题 I am developing a web based application in which i have two hyperlinks in the left side of the page, and what i'm looking for is that when i click on the one hyperlink it should load the content of another.jsp and display it over present.jsp and if I click next hyperlink it should do the same for third.jsp over present.jsp . I found something on stackoverflow like:- javascript-- function showItem(url) { $('#right-pane').load(url); } link--< a href="showItem('another.jsp)">item 1 where "right

JSTL Tomcat 6.0 Cannot find the taglib descriptor Error

天涯浪子 提交于 2019-12-08 07:52:02
问题 I am using Tomcat 6.0 and getting the same red underline saying "Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core" I have the basic index.jsp file with the taglib uri as follows: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> I have added the jstl-1.2.jar under both the Tomcat as well as my webapp folders C:\...\apache-tomcat-6.0.35-windows-x64

How to load Html page which is outside application context using JSP include or c:import or symlink

浪子不回头ぞ 提交于 2019-12-08 03:02:17
问题 I need to load some html pages created dynamically by some other application into my application jsp page using jsp include tag <jsp:include page="${Htmlpath}" /> OR <jsp:include page="D:\MySharedHTML\test.html" /> . My idea is to have a shared folder on server like "MySharedHTML" and let other application create html files there and my app will access by giving full path. But jsp include is saying "requested resource D:\MySharedHTML\test.html is not available". Any inputs how to do it.

how to access a EL variable and pass it as an argument to a function in EL?

时光毁灭记忆、已成空白 提交于 2019-12-08 02:23:37
问题 I want to call a function on a bean with an argument passsed to it in jsp using EL. The problem is it does not allow something like: " ${teacherBean.certificationFor(${particularField}) " the thing is i want to iterate over an array and call the function certificationFor for all the values in the array passed as an argument. I am getting the values in array by: So Basically i want to do something like: ${teacherBean.certificationFor(${particularField}) but i cant do that. can i do this in any

Spring form:select multiple selected value?

橙三吉。 提交于 2019-12-08 00:58:02
问题 I have this edit form: I want that the roles of the user get selected. If this were one-to-many relation I know that I can do something like this: <form:label path="roles">Roles:</form:label> <form:select multiple="true" path="roles"> <c:forEach items="${roles}" var="rol"> <c:choose> <c:when test="${usuarioEdit.rol.id ==rol.id}"> <option value="${rol.id}" selected="selected">${rol.nombre}</option> </c:when> <c:otherwise> <option value="${rol.id}">${rol.nombre}</option> </c:otherwise> </c

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"