hi,
I want my validation.xml to only check for a null if certain options are selected from a dropdown. So far I have
<field property="empFDServiceStartDate" depends="requiredif, date">
<arg0 key="Service Start date" resource="false"/>
<var>
<var-name>field[0]</var-name>
<var-value>moverCh...
I'm writing a custom JSP tag using the JSP 2 tag files. Inside my tag I would like to know which page called the tag in order to construct URLs. Is this possible with out passing it through an attribute?
...
I am using the following servlet-mapping in my web.xml file:
<servlet>
<servlet-name>PostController</servlet-name>
<servlet-class>com.webcodei.controller.PostController</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PostController</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
To do some ki...
I am getting the "This attribute does not support request time values." while compiling my custom jsp tag implementation.
My TLD file
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<...
In my JSP I'm required to compare to Objects to see if they are equal or not using the Object's equals method.
Is there a way to do this using the JSTL or another Tag Library?
(I am not allowed to use Scriptlets due to team rules.)
I tried to use the JSTL tag, but it only seems to use the == operator.
Any suggestions are appreciated...
Hi,
I know you can use the <jsp:useBean> tag to instantiate objects within JSPs without resorting to scriptlet code. However I'd like to instantiate an Integer who value is the result of an EL expression, something like:
<jsp:useBean id="total" class="java.lang.Integer">
<jsp:setProperty name="amount" value="${param1 + param2}"/>
<...
I'm trying to create a jsp tag file but it fails to compile when I try to use pageContext.getServletConfig().getInitParameter("myInitParam")
I'm using tomcat and when I try to view a page including the file I get a jasper compile error pageContext cannot be resolved. I've also tried just using getInitParameter but it fails also. I can u...
I'm using Spring, but this question applies to all JSP-controller type designs.
The JSP page references data (using tags) which is populated by the corresponding controller. My question is, where is the appropriate place to perform formatting, in JSP or the controller?
So far I've been preparing the data by formatting it in my controll...
I'm using Spring's MVC with JSP views. Every JSP page has similar structure - headers, content, footers, perhaps a sidebar, etc. Looking around for "best practices" people seem to "include" footers and headers, but that means that every JSP page includes these "include" statements, giving a fixed format. To my eye a better solution would...
Am doing project in j2ee.I use Browse button. I need to fetch images/files from a folder inside my project folder, everytime.I wish to set my project's folder name as a default location for my browse button.How to do that?
am using tis following code in a jsp page:
and calling the value in servlet :
String image= (String) request.get...
I have a JSP that is using Spring:form tags to bind controls to a command object.
I would like to modify it as follows: if [some condition is true] than display the controls; otherwise, just display the text. (Examples: if the user is an Admin, display the controls, otherwise just display the text. If the whatsit is still open for modi...
Hi all,
Is there any jsp tag library that can perform simple excel editing on web?
...
I'm developing some custom JSP tags. In my SimpleTag.doTag() I grab the JspContext and call getOut() to get the JspWriter. When writing to JspWriter, what's the different between write(String) and print(String)? Should I be calling one instead of the other?
...
We're currently creating an app that needs ATG taglibs on SLING/OSGI, we have created a bundle with these taglibs and uploaded it, of course these taglibs call ATG classes, so we are including them in the bootdelegation, using sling.properties file.
sling.bootdelegation.simple=atg.nucleus
sling.bootdelegation.class.atg.nucleus.Nucleus=a...
I want to use custom jsp tags to help build a menu in my application. However, I want all the actual HTML to live in JSP files, rather than in the Java class.
So, suppose I have a tag like this:
<mytags:Menu>
<mytags:MenuItem name="foo"/>
<mytags:MenuItem name="bar"/>
<mytags:MenuItem name="baz"/>
</mytags:Menu>
I then might h...
I want to do something like this to call a JSP 2.0 tag:
<mytags:foo abc="<%=def%>">
<mytags:bar ghi="<%=jkl%>"/>
</mytags:foo>
Where Strings def and jkl are defined earielr in the jsp file. Suppose my tag files look like this:
foo.tag:
<%@ tag body-content="scriptless" %>
<%@ attribute name="abc" required="true" %>
<div class="${...
I am trying to set a variable that I will refer to in a custom JSP tag, so I have something like this in my JSP:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="path" value="test"/>
However, I am getting this error when The JSP runs:
java.lang.AbstractMethodError: javax.servlet.jsp.PageContext.getELContex...
How do people test jsp 2.0 tags? The ones that have .tag extensions and are basically jsp files with some extra support for passing parameters.
...
Using a JSP page I get username and password. How do I check this in active directory. Please give example with some code.
...
i just introduced a bug into my code because i seem to have misunderstood the jsp tag lifecycle.
The tag worked like this before the bug:
i pass the tag some collection as an attribute, and it displays it as a table. The collection was passed into the JSP from the controller.
after the bug:
a removed the attribute which set the collec...