Posts

Showing posts from March, 2013

Running multiple BASH Unix commands together

for running multiple commands use below patter $bash> command1 && command2

Implementing Custom ResultType in Struts2

Image
there are different types of result types for a struts2 action. for full list please visit. http://struts.apache.org/release/2.1.x/docs/result-types.html from the book  how to implement a custom result type please see on   http://lkreddy.blogspot.in/2012/04/how-to-write-our-own-result-type-in.html public class my customresultType extends PlainTextResult{ } then in struts.xml file define this result type     and then use this in any action

Is Request Ajax: how to find

this is good way to find out if something is ajax or not in java public static boolean isAjax(request) { return "XMLHttpRequest".equals(request.getHeader("X-Requested-With")); }