Where can I run EJBs ?

Where can I run EJBs ?

EJBs are built for more than just a Java EE application server. They can also execute in aJava EE Web Profile container or plain Java SE environment (Java SE ! yeah – Easy JavaBeans !).

EJB Lite

  • Required to support only a subset of the features which are provided by the full EJB specification – a lightweight version of the same
  • A Java EE Web Profile certified container has to support the EJB Lite spec

Contiue reding here……


Exception Handling using JSTL tag….

Here in this post we will learn how to handle Exception in jsp page using JSTL tags

Here is the sample code for this app…


<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<strong>Exception Handling Example</strong><br>
<a href="<c:url value='Check.jsp' />" >Go to Exception Page</a><br>
<%-- The above line is similar to response.encodeURL("url") method of servlet --%>

when we click on Go to Exception Page it will send u too Check.jsp page contain the following code:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<strong>Exception Handling Example</strong>
<c:catch var=”myexception” ><%—This is similar to try { }catch{} of normal exception handling –-%>
<strong>Inside the Catch Block : >></strong>
<% int x = 10/0; %>
<%– the <c:chosoe> , c:when and c:otherwise is equivalant to if {}else {} statement !! thanx –%>

<c:when test=”${myexception != null}” >
There was an Exception : ${myexception.message}<br><br>
<c:otherwise >
No Problem thanks!!
</c:otherwise >

at int x=10/0; there is devide by zero exception which is catch by the above given block

the running example can be found here