Category Archives: JSP

How to create multilevel menu’s in JSP using recursion..

There was a requirement where in I need to create multi-level menu’s in a JSP A role has certain set of Privileges.Each privilege may or may not have child privileges.. Where Privilege has child privileges, it was desired to display … Continue reading

Posted in JSP | Leave a comment

In JSTL/JSP when do I have to use and when can I just say ${myVar}

Source : In JSTL/JSP when do I have to use and when can I just say ${myVar} I’ve been doing this the whole time in my JSP code: <c:out value=”${myVar}”/> Today I just realized for the first time that … Continue reading

Posted in J2EE, Java, JSP | Leave a comment

Problem using c:set of jstl

The problem was that i was not able to set the value of a variable defined in a scriptlet. Root cause: The tag lib i was using was perhaps of an older version. Older version: Newer version: Please do post … Continue reading

Posted in J2EE, Java, JSP, Server Side Programming | Tagged , , , | 1 Comment

Best Practices to improve Performance in JSP

This topic illustrates the performance improvement best practices in JSP with the following sections: Overview of JSP When the user requests a JSP page for the first time, A JSP converts into servlet java source file and compiles into servlet … Continue reading

Posted in JSP | Leave a comment

Reading web-page made easy using JSP

It gives the content of the page into a variable called newstuff…

Posted in JSP | Leave a comment

use OnClick with caution

JSP Code : <a href="abc.jsp" onclick='’>LOGOUT The above statement gets converted to Servlet CODE : out.write(“<a href=\"abc.jsp\" onclick='");session.invalidate(); out.write(“‘>LOGOUT”); Conclusion: What ever scriplet you write in onclick, will get executed every time the JSP is called. Not only on onclick … Continue reading

Posted in JSP, Servlet | 1 Comment

Internationalization tips for JSP

In order to display the complex script characters like Japanese, Chinese, etc in the browser window, the following changes need to be made at the beginning of each JSP file: <%@ page language="java" contentType=”text/html; charset=UTF-8″ pageEncoding=”UTF-8″%> Wherever input controls are … Continue reading

Posted in Java, JSP | 1 Comment