jsp-tags

Testing if a User is Logged in Via JSP/Spring-MVC

Using Spring 3 MVC and JSP, I simply want to test if a user is logged in, I'm not interested in using Spring Security currently <jsp:useBean id="myAppUser" type="com.xxx.MyUser" beanName="myUser" scope="session" /> <c:choose> <c:when test="myUser.loggedIn"> //dostuff </c:when> <c:otherwise> //dootherstuff ...

JSTL - Using forEach to iterate over a user-defined class

What methods do I need to add to a custom Java class so that I can iterate over the items in one of its members? I couldn't find any specifications about how the JSTL forEach tag actually works so I'm not sure how to implement this. For example, if I made a generic "ProjectSet" class and I woud like to use the following markup in the JS...

How to improve the performance of BKPF

Hi Gurus, I want to get BELNR(Accounting Document Number) from BKPF table by pasing BKPF-XBLNR = VBRP-VGBEL (this is the req...) but it is taking more time resulting into time out error, how to make performance wise good, if even any BAPI is there please let me know. Thanks in advance Regards, ...

How can data be passed into an <s:> tag within a Struts tag file via attributes?

I have a form with two halves, one for attaching a wide thumbnail to an asset and one for a standard-size thumbnail. The jsp file generating the page calls thumbnail.tag, which calls thumb.tag twice: <thumbnail:thumb label="75px Thumbnail" /> <thumbnail:thumb label="Wide Thumbnail" /> thumb.tag in turn has the following: <s:if test="...

Add a custom row with displaytag

Is there a way of adding a custom row(s) to the top of a displaytag table? There is a way of adding a footer via display:footer. but why no header? ...

Why does the existing hidden rows are not displayed when I added two rows to the jsp in Firefox3.6?

I have added two rows to a jsp which are displayed one at a time based on the text entered. There are two other rows which are already existing and they are displayed based on their own conditions not related to my changes. All this process works fine in IE6, Chrome, Opera 10 and Safari 4. Except Firefox 3.6: my two rows are displayed as...

Problem including jsp page with unclosed tags

Hi all I have problem including jsp pages. I have one JSP page where I must have not closed tags because in including page I continue filling them and close them. Page beeing included <div class="ui-layout-content"> <form id="kartaForm"> <%-- zalozka Budova --%> <m:zalozka id="tabs-1"> <m:sloupec prvni="true"> ...

Where do I put the .tld file so that the resulting JAR file built with maven2 is properly packaged?

I currently have the following directory structure for my code: src |-- main | `-- java | `-- com | `-- upthescala | `-- tags | `-- ViewProtectTag.java |-- test |-- pom.xml |-- .project |-- .classpath `-- .hgignore I want to include a tld file for my JSP tag, and I'm not sure where to ...

canot find the problem . i think it is in the header file. does not read the header file.

ifndef QUEUE_LNK_H define QUEUE_LNK_H // ********** Class Definition ************* template class Queue { public: Queue(); // Constructor ~Queue(); // Destructor bool isEmpty() const; // Observer bool isFull() const; // Observer void e...

Default value on JSP custom-tag attribute

When defining an attribute for a custom JSP tag, is it possible to specify a default value? The attribute directive doesn't have a default value attribute. Currently I'm making do with: <%@ attribute name="myAttr" required="false" type="java.lang.String" %> <c:if test="${empty myAttr}" > <c:set var="myAttr" value="defaultValue" /> </c...

How to show the loading status in mouse?

Hi, I create jsp page using JSF Framework. If i perform some action(Login), then go to the backend and perform some process and it will return some value. Here this whole process will be taken some times. Now that time i want to show processing status (wait or busy status) in Mouse. That means after i press Login button , i want to sho...

set a date, and the image will be displayed from up to and then automatically be removed.

hello i need to set a date, and the image will be displayed from 15th to 2oth and and for another image from 25th to 27th then automatically be removed. ...

Effective way to handle singular/plural word based on some collection size

There are many instances in my work projects where I need to display the size of some collection in a sentence. For example, if the collection's size is 5, it will say "5 users". If it is size of 1 or 0, it will say "1 user" or "0 user". Right now, I'm doing it with if-else statement to determine whether to print the "s" or not, which is...

How can I figure out the name of a JSP tag in Java?

Currently I have the following code: Tag tag = getParent(); while(tag != null) { parents.append("child of ") .append(tag.getClass().getName()) .append("\n"); tag = tag.getParent(); } when this runs, I get the following: com.mystuff.mvc.tag.MyTag child of org.apache.taglibs.standard.tag.rt.core.IfTag ch...

Add tags with colon in JSP 2.0

I'm implementing a sitemap file with videos. Google asks these files to have tags like: <video:video> <video:content_loc>..</video:content_loc> </video:video> But JSP 2.0 doesn't allow me to. colon is supposed to be used for declarative tags. How can I generate these tags in a clean way? (no CDATA) ...

logic: equal with the contents of a hidden field

I have a hidden field: <input type="hidden" name="champs" id="champs"> I want do a <logic:equal> with the content of this field hidden, I tried the solutions but not work <logic:equal name="virement" property="statut" value='champs' > just be there is a syntax very precise in the value property of the logic: equal that I can found...

To use <jsp:forward> or response.sendRedirect?

Hi, In my application i am using <jsp:forward> to redirect to the page the user wants. So the index page has <jsp:forward> to the add publication page. This throw errors on first load. So should i use response.sendRedirect? Thanks in Advance, Dean ...

Can i use iterator within iterator on jsp in struts2.0 ?

This is the ArrayList defined in the private ArrayList<LocWiseSaleParam> locWiseSaleList; where LocWiseSaleParam is myaction class I am using a iterator on jsp and accessing its values. but can i use the iterator with the same value as nested iterator <s:iterator value="locWiseSaleList" id="list" > <s:iterator value="l...

JSP and tag files UTF-8 encoding

Hello, I am using Spring 3.0.3 + sitemesh + JSP and I am experiencing troubles with encoding of result page. I have used Spring's CharacterEncodingFilter to encode response and request with UTF-8, I have stated in JSTLViewResolver appropriate contentType. I also have saved my jsp's and tag's in UTF-8 format. What I would really want t...

midlet application

I have to generate random number between 1 to 10 and compare the highers number and lower numbers. if the random number is high then display on the screen otherwise goto wrong screen shown text box, score, if the random number is low compare to lower num then display on the lower screen.here we have to increment score with 5 for every co...