Session Validation in Ajax

Session validation in servlet: Usually if it is a servlet we can simply check if(session != null ){ // Business code }else{ // Redirection code }   Session validation in ajax: If you call the servlet from ajax then the above steps won’t work, since ajax gets everything as response, so the code which you have written in the else […]

377 total views, no views today

» Read more

Passing clicked value from jsp to jsp/servlet

Passing value from jsp to jsp/servlet: We can pass the value from jsp to servlet using, request.getParameter(“text”); //servlet code to get the jsp value where text is the name of the input fields (text field). Passing clicked value from jsp to jsp/servlet: We have to pass the clicked value as get parameter in the href link like below, <a href=”/Myservlet?input=javadomain”> […]

1,409 total views, 1 views today

» Read more

Javascript href onclick open new window

Javascript code to open new window:“”) – opens in new window.“”,”My window”) – My window is the name of the new window. Javascript code to close the current window: window.close() – close the current opened window. It will ask the popup confirmation. Javascript code to close without popup confirmation:”,’_self’); window.close();“”); // It wont allow to […]

615 total views, 3 views today

» Read more