Java-Make functions asynchronous

So there must be a lot of threads running related to this topic over the internet, and is probably something that i must have read in basic Java class, it caught my attention only when i had to increase the performance of one of my codes. I wrote a function which was doing two¬†things in …

Advertisements

Spring Annotations : One line description to make sense out of them

@Autowired : Binding one class with another by type@Resource : Binding one class with another by name¬†@RequestMapping : To map url with function/class@RequestHeader : To map parameter to header variable@modelAttribute : To map parameter with attribute present in model@RequestParam : To map parameter with attribute present in request@SessionAttribute : To map parameter with attribute present …

Perform var1.contains(var2) in jsp

In jsp, performing equals or not equals is pretty simple :for equals :<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><c:if test="${var1 eq var2}">for not equals : <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><c:if test="${var1 ne var2}">To perform contains function, following snippet will be used : <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %><c:if test="${fn:contains(var1, 'test')}">

Make a variable in upper or lower case in jsp.

Making a variable/String in upper or lower case is known by all, we just have to do the following : String str="hello"; String UpperStr=str.toLowerCase(); That is, there is an inbuilt function in java to do the same. In jsp, you can do the following : <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <c:set var="count" value="{(fn:toLowerCase(count.isocode)}" > And then …